优化:订单模块、发货模块
This commit is contained in:
@@ -6,12 +6,11 @@ import com.gxwebsoft.shop.entity.ShopMerchant;
|
|||||||
import com.gxwebsoft.shop.param.ShopMerchantParam;
|
import com.gxwebsoft.shop.param.ShopMerchantParam;
|
||||||
import com.gxwebsoft.common.core.web.ApiResult;
|
import com.gxwebsoft.common.core.web.ApiResult;
|
||||||
import com.gxwebsoft.common.core.web.PageResult;
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
import com.gxwebsoft.common.core.web.PageParam;
|
|
||||||
import com.gxwebsoft.common.core.web.BatchParam;
|
import com.gxwebsoft.common.core.web.BatchParam;
|
||||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ import java.util.List;
|
|||||||
* 商户控制器
|
* 商户控制器
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2025-01-11 10:45:12
|
* @since 2025-08-10 20:43:33
|
||||||
*/
|
*/
|
||||||
@Tag(name = "商户管理")
|
@Tag(name = "商户管理")
|
||||||
@RestController
|
@RestController
|
||||||
@@ -31,6 +30,7 @@ public class ShopMerchantController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private ShopMerchantService shopMerchantService;
|
private ShopMerchantService shopMerchantService;
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopMerchant:list')")
|
||||||
@Operation(summary = "分页查询商户")
|
@Operation(summary = "分页查询商户")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public ApiResult<PageResult<ShopMerchant>> page(ShopMerchantParam param) {
|
public ApiResult<PageResult<ShopMerchant>> page(ShopMerchantParam param) {
|
||||||
@@ -38,6 +38,7 @@ public class ShopMerchantController extends BaseController {
|
|||||||
return success(shopMerchantService.pageRel(param));
|
return success(shopMerchantService.pageRel(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopMerchant:list')")
|
||||||
@Operation(summary = "查询全部商户")
|
@Operation(summary = "查询全部商户")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public ApiResult<List<ShopMerchant>> list(ShopMerchantParam param) {
|
public ApiResult<List<ShopMerchant>> list(ShopMerchantParam param) {
|
||||||
@@ -53,6 +54,8 @@ public class ShopMerchantController extends BaseController {
|
|||||||
return success(shopMerchantService.getByIdRel(id));
|
return success(shopMerchantService.getByIdRel(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopMerchant:save')")
|
||||||
|
@OperationLog
|
||||||
@Operation(summary = "添加商户")
|
@Operation(summary = "添加商户")
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
public ApiResult<?> save(@RequestBody ShopMerchant shopMerchant) {
|
public ApiResult<?> save(@RequestBody ShopMerchant shopMerchant) {
|
||||||
@@ -67,6 +70,8 @@ public class ShopMerchantController extends BaseController {
|
|||||||
return fail("添加失败");
|
return fail("添加失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopMerchant:update')")
|
||||||
|
@OperationLog
|
||||||
@Operation(summary = "修改商户")
|
@Operation(summary = "修改商户")
|
||||||
@PutMapping()
|
@PutMapping()
|
||||||
public ApiResult<?> update(@RequestBody ShopMerchant shopMerchant) {
|
public ApiResult<?> update(@RequestBody ShopMerchant shopMerchant) {
|
||||||
@@ -76,6 +81,8 @@ public class ShopMerchantController extends BaseController {
|
|||||||
return fail("修改失败");
|
return fail("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopMerchant:remove')")
|
||||||
|
@OperationLog
|
||||||
@Operation(summary = "删除商户")
|
@Operation(summary = "删除商户")
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
@@ -85,6 +92,8 @@ public class ShopMerchantController extends BaseController {
|
|||||||
return fail("删除失败");
|
return fail("删除失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopMerchant:save')")
|
||||||
|
@OperationLog
|
||||||
@Operation(summary = "批量添加商户")
|
@Operation(summary = "批量添加商户")
|
||||||
@PostMapping("/batch")
|
@PostMapping("/batch")
|
||||||
public ApiResult<?> saveBatch(@RequestBody List<ShopMerchant> list) {
|
public ApiResult<?> saveBatch(@RequestBody List<ShopMerchant> list) {
|
||||||
@@ -94,6 +103,8 @@ public class ShopMerchantController extends BaseController {
|
|||||||
return fail("添加失败");
|
return fail("添加失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopMerchant:update')")
|
||||||
|
@OperationLog
|
||||||
@Operation(summary = "批量修改商户")
|
@Operation(summary = "批量修改商户")
|
||||||
@PutMapping("/batch")
|
@PutMapping("/batch")
|
||||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<ShopMerchant> batchParam) {
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<ShopMerchant> batchParam) {
|
||||||
@@ -103,6 +114,8 @@ public class ShopMerchantController extends BaseController {
|
|||||||
return fail("修改失败");
|
return fail("修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasAuthority('shop:shopMerchant:remove')")
|
||||||
|
@OperationLog
|
||||||
@Operation(summary = "批量删除商户")
|
@Operation(summary = "批量删除商户")
|
||||||
@DeleteMapping("/batch")
|
@DeleteMapping("/batch")
|
||||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ package com.gxwebsoft.shop.entity;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import java.util.Date;
|
import java.time.LocalDateTime;
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
* 商户
|
* 商户
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2025-01-11 10:45:12
|
* @since 2025-08-10 20:43:33
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@@ -25,7 +24,7 @@ public class ShopMerchant implements Serializable {
|
|||||||
|
|
||||||
@Schema(description = "ID")
|
@Schema(description = "ID")
|
||||||
@TableId(value = "merchant_id", type = IdType.AUTO)
|
@TableId(value = "merchant_id", type = IdType.AUTO)
|
||||||
private Long merchantId;
|
private Integer merchantId;
|
||||||
|
|
||||||
@Schema(description = "商户名称")
|
@Schema(description = "商户名称")
|
||||||
private String merchantName;
|
private String merchantName;
|
||||||
@@ -139,6 +138,6 @@ public class ShopMerchant implements Serializable {
|
|||||||
private Integer tenantId;
|
private Integer tenantId;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
private Date createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,6 +159,9 @@ public class ShopOrder implements Serializable {
|
|||||||
@Schema(description = "发货状态(10未发货 20已发货 30部分发货)")
|
@Schema(description = "发货状态(10未发货 20已发货 30部分发货)")
|
||||||
private Integer deliveryStatus;
|
private Integer deliveryStatus;
|
||||||
|
|
||||||
|
@Schema(description = "发货备注")
|
||||||
|
private String deliveryNote;
|
||||||
|
|
||||||
@Schema(description = "发货时间")
|
@Schema(description = "发货时间")
|
||||||
private Date deliveryTime;
|
private Date deliveryTime;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
* 商户Mapper
|
* 商户Mapper
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2025-01-11 10:45:12
|
* @since 2025-08-10 20:43:33
|
||||||
*/
|
*/
|
||||||
public interface ShopMerchantMapper extends BaseMapper<ShopMerchant> {
|
public interface ShopMerchantMapper extends BaseMapper<ShopMerchant> {
|
||||||
|
|
||||||
|
|||||||
@@ -224,7 +224,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="param.statusFilter == 1">
|
<if test="param.statusFilter == 1">
|
||||||
<!-- 1待发货:已付款但未发货 -->
|
<!-- 1待发货:已付款但未发货 -->
|
||||||
AND a.pay_status = 1 AND a.delivery_status = 10
|
AND a.pay_status = 1 AND a.delivery_status = 10 AND a.order_status = 0
|
||||||
</if>
|
</if>
|
||||||
<if test="param.statusFilter == 2">
|
<if test="param.statusFilter == 2">
|
||||||
<!-- 2待核销:已付款但订单状态为未使用 -->
|
<!-- 2待核销:已付款但订单状态为未使用 -->
|
||||||
@@ -250,6 +250,10 @@
|
|||||||
<!-- 7已删除:订单被删除 -->
|
<!-- 7已删除:订单被删除 -->
|
||||||
AND a.deleted = 1
|
AND a.deleted = 1
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.statusFilter == 8">
|
||||||
|
<!-- 8已取消:订单已取消 -->
|
||||||
|
AND a.order_status = 2
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import com.gxwebsoft.common.core.annotation.QueryType;
|
|||||||
import com.gxwebsoft.common.core.web.BaseParam;
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -14,7 +13,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
* 商户查询参数
|
* 商户查询参数
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2025-01-11 10:45:12
|
* @since 2025-08-10 20:43:33
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
|||||||
@@ -172,6 +172,9 @@ public class ShopOrderParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer deliveryStatus;
|
private Integer deliveryStatus;
|
||||||
|
|
||||||
|
@Schema(description = "发货备注")
|
||||||
|
private String deliveryNote;
|
||||||
|
|
||||||
@Schema(description = "发货时间")
|
@Schema(description = "发货时间")
|
||||||
private String deliveryTime;
|
private String deliveryTime;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.util.List;
|
|||||||
* 商户Service
|
* 商户Service
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2025-01-11 10:45:12
|
* @since 2025-08-10 20:43:33
|
||||||
*/
|
*/
|
||||||
public interface ShopMerchantService extends IService<ShopMerchant> {
|
public interface ShopMerchantService extends IService<ShopMerchant> {
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
* 商户Service实现
|
* 商户Service实现
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2025-01-11 10:45:12
|
* @since 2025-08-10 20:43:33
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, ShopMerchant> implements ShopMerchantService {
|
public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, ShopMerchant> implements ShopMerchantService {
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ public class ShopGenerator {
|
|||||||
// "shop_spec",
|
// "shop_spec",
|
||||||
// "shop_spec_value",
|
// "shop_spec_value",
|
||||||
// "shop_goods",
|
// "shop_goods",
|
||||||
"shop_coupon",
|
// "shop_coupon",
|
||||||
// "shop_category",
|
// "shop_category",
|
||||||
// "shop_goods_spec",
|
// "shop_goods_spec",
|
||||||
// "shop_goods_sku",
|
// "shop_goods_sku",
|
||||||
// "shop_goods_category",
|
// "shop_goods_category",
|
||||||
"shop_coupon",
|
// "shop_coupon",
|
||||||
// "shop_goods_description",
|
// "shop_goods_description",
|
||||||
// "shop_goods_log",
|
// "shop_goods_log",
|
||||||
// "shop_goods_relation",
|
// "shop_goods_relation",
|
||||||
@@ -89,7 +89,7 @@ public class ShopGenerator {
|
|||||||
// "shop_dealer_user",
|
// "shop_dealer_user",
|
||||||
// "shop_user_referee",
|
// "shop_user_referee",
|
||||||
// "shop_dealer_withdraw",
|
// "shop_dealer_withdraw",
|
||||||
"shop_user_coupon",
|
// "shop_user_coupon",
|
||||||
// "shop_cart",
|
// "shop_cart",
|
||||||
// "shop_count",
|
// "shop_count",
|
||||||
// "shop_express",
|
// "shop_express",
|
||||||
|
|||||||
Reference in New Issue
Block a user