feat(user): 添加用户余额字段支持

- 在 UserEntity 中添加 money 字段并配置为非数据库映射字段
- 更新 UserDao.xml 查询语句,关联 user_money 表并添加余额查询
- 为用户列表分页查询添加余额显示功能
- 配置新的 Maven 仓库源以支持依赖包获取
- 添加 Docker 部署脚本用于镜像构建和推送
This commit is contained in:
wxys233 2026-02-07 14:42:00 +08:00
parent 64e9304966
commit 6badf1652b
4 changed files with 35 additions and 1 deletions

23
deploy.sh Executable file
View file

@ -0,0 +1,23 @@
#!/bin/bash
# 设置版本号或标签
TAG="songshui:sqx-1.0.3"
IMAGE_NAME="crpi-189p4y6a6tb3b6dl.cn-hangzhou.personal.cr.aliyuncs.com/peng_all"
# 构建 Docker 镜像
docker build --platform linux/amd64 -t "$TAG" .
# 获取构建后的镜像ID
IMAGE_ID=$(docker images -q "$TAG")
# 标记镜像
docker tag "$IMAGE_ID" "$IMAGE_NAME/$TAG"
# 推送到远程仓库
docker push "$IMAGE_NAME/$TAG"
# 删除镜像
docker rmi "$IMAGE_NAME/$TAG"
# 打印信息
echo "Docker image built and pushed with tag: $TAG"

View file

@ -481,6 +481,11 @@
</build>
<repositories>
<repository>
<id>showye-repository-r3d</id>
<name>Showye Repository</name>
<url>https://maven.showye.cn/r3d</url>
</repository>
<repository>
<id>public</id>
<name>aliyun nexus</name>

View file

@ -219,6 +219,9 @@ public class UserEntity implements Serializable {
*/
private Integer isSafetyMoney;
@TableField(exist = false)
private BigDecimal money;
/**
* 是否是推广员 1是
*/

View file

@ -13,6 +13,7 @@
<select id="selectUserPage" resultType="com.sqx.modules.app.entity.UserEntity">
select * from ( SELECT
u.*,
IFNULL(um.money,0) AS money,
l.laundry_name AS laundryName,
IF(v.is_vip = 1, 1, 2) AS isVip,
v.end_time as vipEndTime,
@ -24,6 +25,8 @@
ON l.laundry_id = u.laundry_id
LEFT JOIN user_vip v
ON u.user_id = v.user_id
LEFT JOIN user_money um
ON u.user_id = um.user_id
WHERE 1 = 1
<if test="isVip==2">
and (v.is_vip =2 or v.is_vip is null)
@ -425,4 +428,4 @@
and latitude is not null
and laundry_id is not null
</select>
</mapper>
</mapper>