feat(cms/pwl/shop): 添加关键词搜索功能并优化订单状态更新
- 在 CmsWebsiteFieldMapper.xml 中添加关键词搜索条件,支持对 comments、value 和 name 字段进行模糊搜索 - 在 PwlProjectMapper.xml 中移除对 item_year 字段的关键词搜索条件- 在 ShopOrderController 中,为订单状态为 4(申请退款)的订单自动设置退款申请时间
This commit is contained in:
@@ -53,6 +53,12 @@
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.value LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -138,7 +138,6 @@
|
||||
AND (a.name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.id = #{param.keywords}
|
||||
OR a.code = #{param.keywords}
|
||||
OR a.item_year = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
|
||||
@@ -163,6 +163,10 @@ public class ShopOrderController extends BaseController {
|
||||
@Operation(summary = "修改订单")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody ShopOrder shopOrder) {
|
||||
// 申请退款
|
||||
if(shopOrder.getOrderStatus().equals(4)){
|
||||
shopOrder.setRefundApplyTime(LocalDateTime.now());
|
||||
}
|
||||
if (shopOrderService.updateById(shopOrder)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user