轮播图和用户消息
This commit is contained in:
@@ -67,6 +67,25 @@ public class ParamTest {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void addAppFormalAgreementParamValue() {
|
||||
|
||||
String paramKey = "yichayilu:app:formal:user:agreement";
|
||||
String paramName = "商城app用户协议";
|
||||
String remark = "商城app用户协议";
|
||||
|
||||
|
||||
Param param = new Param();
|
||||
param.setParamKey(paramKey);
|
||||
param.setParamName(paramName);
|
||||
param.setParamValue("商城app用户协议");
|
||||
param.setRemark(remark);
|
||||
|
||||
paramService.save(param);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void addAppFormalOrderModelType() {
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package org.springblade.test.userPoint;
|
||||
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springblade.core.test.BladeBootTest;
|
||||
import org.springblade.core.test.BladeSpringExtension;
|
||||
import org.springblade.modules.userPoint.dto.UserAmountDTO;
|
||||
import org.springblade.modules.userPoint.pojo.entity.UserMallIntegralEntity;
|
||||
import org.springblade.modules.userPoint.service.IUserMallIntegralService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@ExtendWith(BladeSpringExtension.class)
|
||||
@BladeBootTest(appName = "blade-runner" , profile = "test")
|
||||
public class UserPointTest {
|
||||
|
||||
@Resource
|
||||
private IUserMallIntegralService userMallIntegralService;
|
||||
|
||||
@Test
|
||||
public void addAmount() {
|
||||
|
||||
for (int i = 0; i < 20; i++){
|
||||
UserMallIntegralEntity mallIntegral = userMallIntegralService.getById(2017162601210183681L);
|
||||
Integer version = 1;
|
||||
if (mallIntegral == null){
|
||||
mallIntegral = new UserMallIntegralEntity();
|
||||
mallIntegral.setAmount(BigDecimal.ZERO);
|
||||
mallIntegral.setId(2017162601210183681L);
|
||||
mallIntegral.setVersion(version);
|
||||
userMallIntegralService.save(mallIntegral);
|
||||
}else {
|
||||
version = mallIntegral.getVersion();
|
||||
}
|
||||
UserAmountDTO dto = new UserAmountDTO();
|
||||
dto.setUserId(2017162601210183681L);
|
||||
dto.setAmount(new BigDecimal(666));
|
||||
dto.setOrderId(1L);
|
||||
dto.setSourceId(2017162601210183681L);
|
||||
dto.setSourceDetail("19115988697");
|
||||
dto.setVersion(version);
|
||||
dto.setRemark("测试");
|
||||
|
||||
userMallIntegralService.addAmount(dto);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user