Merge remote-tracking branch 'origin/master'

This commit is contained in:
2025-03-19 14:43:56 +08:00
6 changed files with 228 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ public class MemberPointsController {
* 001-会员积分账户信息
*/
@GetMapping("userPoints")
public CzgResult<MemberPoints> getMemberPoints(@RequestParam("userId") Long shopUserId) {
public CzgResult<MemberPoints> getMemberPoints(@RequestParam Long shopUserId) {
MemberPoints data = memberPointsService.getMemberPoints(shopUserId);
return CzgResult.success(data);
}
@@ -55,7 +55,7 @@ public class MemberPointsController {
* @param orderAmount 订单金额
*/
@GetMapping("calcUsablePoints")
public CzgResult<OrderDeductionPointsDTO> getMemberUsablePoints(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount) {
public CzgResult<OrderDeductionPointsDTO> getMemberUsablePoints(@RequestParam Long shopUserId, @RequestParam BigDecimal orderAmount) {
OrderDeductionPointsDTO usablePoints = memberPointsService.getMemberUsablePoints(shopUserId, orderAmount);
return CzgResult.success(usablePoints);
}
@@ -68,7 +68,7 @@ public class MemberPointsController {
* @param deductionAmount 抵扣金额
*/
@GetMapping("calcUsedPoints")
public CzgResult<Integer> calcUsedPoints(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam BigDecimal deductionAmount) {
public CzgResult<Integer> calcUsedPoints(@RequestParam Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam BigDecimal deductionAmount) {
int points = memberPointsService.calcUsedPoints(shopUserId, orderAmount, deductionAmount);
return CzgResult.success(points);
}
@@ -77,7 +77,7 @@ public class MemberPointsController {
* 003-根据积分计算可抵扣金额
*/
@GetMapping("calcDeductionAmount")
public CzgResult<BigDecimal> calcDeductionAmount(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
public CzgResult<BigDecimal> calcDeductionAmount(@RequestParam Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
BigDecimal deductionAmount = memberPointsService.calcDeductionAmount(shopUserId, orderAmount, points);
return CzgResult.success(deductionAmount);
}

View File

@@ -0,0 +1,53 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://rm-bp1b572nblln4jho2po.mysql.rds.aliyuncs.com:3306/czg_cashier_test?useUnicode=true&characterEncoding=utf-8
username: root
password: Czg666888
data:
redis:
host: 121.40.109.122
port: 6379
password: chaozg123
timeout: 1000
database: 3
cloud:
nacos:
discovery:
server-addr: 121.40.109.122:8848
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
rabbitmq:
host: 121.40.109.122
port: 5672
username: chaozg
password: chaozg123
dubbo:
application:
name: account-server
qos-port: 22223
qos-enable: true
registry:
address: nacos://121.40.109.122:8848 # Nacos 服务地址
group: server-prod
protocol:
threads: 20
port: 10103
name: dubbo
serialization: hessian2
seata:
application-id: account-server
tx-service-group: group_seata
config:
type: nacos
nacos:
server-addr: 121.40.109.122:8848
namespace:
group: group_seata