Commit f2662ffb authored by zhuxiang's avatar zhuxiang
Browse files

数据库配置切换

parent 45bd2ad2
......@@ -27,8 +27,12 @@ public class GroupDetailServiceImpl extends ServiceImpl<GroupDetailMapper, Group
@Override
public List<GroupDetailEntity> queryList(GroupDetailDTO groupDetailDTO) {
return baseMapper.selectList(new LambdaQueryWrapper<GroupDetailEntity>()
List<GroupDetailEntity> groupDetailEntityList = baseMapper.selectList(new LambdaQueryWrapper<GroupDetailEntity>()
.eq(GroupDetailEntity::getGroupId, groupDetailDTO.getGroupId()));
// 安全移除元素
groupDetailEntityList.removeIf(groupDetailEntity -> groupDetailEntity.getUserName().contains("商户"));
return groupDetailEntityList;
}
@Override
......
......@@ -33,9 +33,11 @@ public class GroupServiceImpl extends ServiceImpl<GroupMapper, GroupEntity> impl
GroupVO groupVO = groups.get(i);
GroupEntity groupEntity = new GroupEntity();
groupEntity.setGroupSize(groupVO.getGroupSize());
groupEntity.setGroupName("团体" + 1);
groupEntity.setGroupName("团体" + i);
groupEntity.setCaseId(id);
groupEntity.setTotalAmount(groupVO.getTotalAmount());
double totalAmount = groupVO.getTotalAmount();
double formattedAmount = Math.round(totalAmount * 100.0) / 100.0;
groupEntity.setTotalAmount(formattedAmount);
groupEntity.setTotalTransactions(groupVO.getTotalTransactions());
//入库
save(groupEntity);
......
......@@ -4,9 +4,9 @@ server:
spring:
datasource:
username: root
password: xukang123
password: RZKJ_0415$
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://101.126.87.27:3306/relation?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
url: jdbc:mysql://47.110.71.183:3306/relation?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
servlet:
multipart:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment