价格优化
This commit is contained in:
parent
56604c7d61
commit
f420f10508
|
@ -6,10 +6,7 @@ import jakarta.validation.constraints.NotEmpty;
|
|||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
@ -69,28 +66,6 @@ public class ActivityEnterController extends BaseController {
|
|||
return R.ok(activityEnterService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增活动报名
|
||||
*/
|
||||
@SaCheckPermission("activity:enter:add")
|
||||
@Log(title = "活动报名", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ActivityEnterBo bo) {
|
||||
return toAjax(activityEnterService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改活动报名
|
||||
*/
|
||||
@SaCheckPermission("activity:enter:edit")
|
||||
@Log(title = "活动报名", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ActivityEnterBo bo) {
|
||||
return toAjax(activityEnterService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除活动报名
|
||||
*
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.dromara.scale.service.IReservationService;
|
|||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -140,12 +139,12 @@ public class WxCounselorController extends BaseController {
|
|||
@Log(title = "修改预约价格", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/price")
|
||||
public R<Void> editPrice(String price) {
|
||||
public R<Void> editPrice(@RequestBody CounselorBo bo) {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
CounselorBo bo = new CounselorBo();
|
||||
bo.setId(userId);
|
||||
bo.setPrice(new BigDecimal(price));
|
||||
return toAjax(counselorService.updateByBo(bo));
|
||||
CounselorBo newBo = new CounselorBo();
|
||||
newBo.setId(userId);
|
||||
newBo.setPrice(bo.getPrice());
|
||||
return toAjax(counselorService.updateByBo(newBo));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
|
|||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.scale.service.ISysScaleOrderService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
@ -26,6 +27,8 @@ public class WxPayController {
|
|||
|
||||
private final WxPayService payService;
|
||||
|
||||
private final ISysScaleOrderService sysScaleOrderService;
|
||||
|
||||
@PostMapping("/notify/order/scale")
|
||||
public String parseScaleNotifyResult(@RequestBody String xmlData) throws WxPayException {
|
||||
final WxPayOrderNotifyResult notifyResult = this.payService.parseOrderNotifyResult(xmlData);
|
||||
|
|
|
@ -48,4 +48,6 @@ public interface ISysScaleOrderService {
|
|||
*/
|
||||
<T> T insertByBo(SysScaleOrderBo bo) throws Exception;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue