feat: 接口新增部分字段
- 总后台数据统计中,增加用户总余额统计 - 配送端订单详情中,增加用户在押桶数量统计
This commit is contained in:
parent
680bc9fb97
commit
a71844875a
11 changed files with 61 additions and 16 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
FROM java:8u111-jdk
|
FROM openjdk:8u342-jre
|
||||||
|
|
||||||
#作者
|
#作者
|
||||||
LABEL maintainer="peng"
|
LABEL maintainer="peng"
|
||||||
|
|
|
||||||
26
README.md
26
README.md
|
|
@ -34,6 +34,32 @@
|
||||||
- Eclipse、IDEA运行sqxApplication.java,则可启动项目
|
- Eclipse、IDEA运行sqxApplication.java,则可启动项目
|
||||||
- Swagger文档路径:http://localhost:8964/sqx_fast/swagger/index.html
|
- Swagger文档路径:http://localhost:8964/sqx_fast/swagger/index.html
|
||||||
- Swagger注解路径:http://localhost:8964/sqx_fast/swagger-ui.html
|
- Swagger注解路径:http://localhost:8964/sqx_fast/swagger-ui.html
|
||||||
|
使用以下命令安装依赖
|
||||||
|
```bash
|
||||||
|
# 安装 icbc-api-sdk-cop.jar
|
||||||
|
mvn install:install-file \
|
||||||
|
-Dfile=src/main/resources/lib/icbc-api-sdk-cop.jar \
|
||||||
|
-DgroupId=com.icbc \
|
||||||
|
-DartifactId=icbc-api-sdk-cop \
|
||||||
|
-Dversion=1.0.5 \
|
||||||
|
-Dpackaging=jar
|
||||||
|
|
||||||
|
# 安装 icbc-api-sdk-cop-io.jar
|
||||||
|
mvn install:install-file \
|
||||||
|
-Dfile=src/main/resources/lib/icbc-api-sdk-cop-io.jar \
|
||||||
|
-DgroupId=com.icbc \
|
||||||
|
-DartifactId=icbc-api-sdk-cop-io \
|
||||||
|
-Dversion=1.0.5 \
|
||||||
|
-Dpackaging=jar
|
||||||
|
|
||||||
|
# 安装 hsm-software-share-1.0.5.jar
|
||||||
|
mvn install:install-file \
|
||||||
|
-Dfile=src/main/resources/lib/hsm-software-share-1.0.5.jar \
|
||||||
|
-DgroupId=com.icbc \
|
||||||
|
-DartifactId=icbc-hsm \
|
||||||
|
-Dversion=1.0.5 \
|
||||||
|
-Dpackaging=jar
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
|
||||||
9
pom.xml
9
pom.xml
|
|
@ -406,11 +406,6 @@
|
||||||
<artifactId>icbc-hsm</artifactId>
|
<artifactId>icbc-hsm</artifactId>
|
||||||
<version>1.0.5</version>
|
<version>1.0.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--<dependency>-->
|
|
||||||
<!--<groupId>com.baidu.aip</groupId>-->
|
|
||||||
<!-- <artifactId>java-sdk</artifactId>-->
|
|
||||||
<!-- <version>4.11.3</version>-->
|
|
||||||
<!--</dependency>-->
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
@ -489,7 +484,7 @@
|
||||||
<repository>
|
<repository>
|
||||||
<id>public</id>
|
<id>public</id>
|
||||||
<name>aliyun nexus</name>
|
<name>aliyun nexus</name>
|
||||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
<url>https://maven.aliyun.com/repository/public</url>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
|
|
@ -499,7 +494,7 @@
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>public</id>
|
<id>public</id>
|
||||||
<name>aliyun nexus</name>
|
<name>aliyun nexus</name>
|
||||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
<url>https://maven.aliyun.com/repository/public</url>
|
||||||
<releases>
|
<releases>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</releases>
|
</releases>
|
||||||
|
|
|
||||||
|
|
@ -345,6 +345,8 @@ public class UserController {
|
||||||
//设置本年收入
|
//设置本年收入
|
||||||
homeMessageResponse.setYearRevenue(userService.queryPayMoney(3));
|
homeMessageResponse.setYearRevenue(userService.queryPayMoney(3));
|
||||||
|
|
||||||
|
//设置所有用户总金额
|
||||||
|
homeMessageResponse.setTotalMoney(userMoneyService.sumMoney());
|
||||||
return Result.success().put("data", homeMessageResponse);
|
return Result.success().put("data", homeMessageResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,9 @@ public interface UserMoneyDao extends BaseMapper<UserMoney> {
|
||||||
|
|
||||||
|
|
||||||
BigDecimal sumHasSafetyMoney();
|
BigDecimal sumHasSafetyMoney();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询总金额
|
||||||
|
*/
|
||||||
|
BigDecimal sumMoney();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,4 +49,9 @@ public class HomeMessageResponse implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Double yearRevenue;
|
private Double yearRevenue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所有用户金额
|
||||||
|
*/
|
||||||
|
private BigDecimal totalMoney;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,11 @@ import com.sqx.modules.app.entity.UserMoneyDetails;
|
||||||
import org.springframework.web.bind.annotation.RequestAttribute;
|
import org.springframework.web.bind.annotation.RequestAttribute;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
public interface UserMoneyService extends IService<UserMoney> {
|
public interface UserMoneyService extends IService<UserMoney> {
|
||||||
|
|
||||||
|
BigDecimal sumMoney();
|
||||||
|
|
||||||
UserMoney selectUserMoneyByUserId(Long userId);
|
UserMoney selectUserMoneyByUserId(Long userId);
|
||||||
|
|
||||||
void updateSafetyMoneyWay(Long id, Integer safetyMoneyWay, String orderNo);
|
void updateSafetyMoneyWay(Long id, Integer safetyMoneyWay, String orderNo);
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,11 @@ public class UserMoneyServiceImpl extends ServiceImpl<UserMoneyDao, UserMoney> i
|
||||||
baseMapper.updateSafetyMoney(i, userId, money);
|
baseMapper.updateSafetyMoney(i, userId, money);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BigDecimal sumMoney() {
|
||||||
|
return baseMapper.sumMoney();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserMoney selectUserMoneyByUserId(Long userId) {
|
public UserMoney selectUserMoneyByUserId(Long userId) {
|
||||||
UserMoney userMoney = baseMapper.selectOne(new QueryWrapper<UserMoney>().eq("user_id", userId));
|
UserMoney userMoney = baseMapper.selectOne(new QueryWrapper<UserMoney>().eq("user_id", userId));
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,7 @@ import com.sqx.modules.taking.entity.OrderTaking;
|
||||||
import com.sqx.modules.tbCoupon.entity.TbCouponUser;
|
import com.sqx.modules.tbCoupon.entity.TbCouponUser;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -141,12 +138,15 @@ public class Orders implements Serializable {
|
||||||
private String laundryPhone;
|
private String laundryPhone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*是否已修改桶数量 0未修改 1已修改
|
* 是否已修改桶数量 0未修改 1已修改
|
||||||
*/
|
*/
|
||||||
private Integer isUpdateBucket;
|
private Integer isUpdateBucket;
|
||||||
/**
|
/**
|
||||||
*是否已推送
|
* 是否已推送
|
||||||
*/
|
*/
|
||||||
private Integer isPushMeg;
|
private Integer isPushMeg;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private int bucket;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ import com.sqx.modules.utils.SenInfoCheckUtil;
|
||||||
import com.sqx.modules.utils.excel.ExcelData;
|
import com.sqx.modules.utils.excel.ExcelData;
|
||||||
import jodd.util.StringUtil;
|
import jodd.util.StringUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import lombok.val;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.gavaghan.geodesy.Ellipsoid;
|
import org.gavaghan.geodesy.Ellipsoid;
|
||||||
import org.gavaghan.geodesy.GlobalCoordinates;
|
import org.gavaghan.geodesy.GlobalCoordinates;
|
||||||
|
|
@ -985,6 +986,8 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
||||||
orders.setLaundryPhone(laundry.getLaundryPhone());
|
orders.setLaundryPhone(laundry.getLaundryPhone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
val userBucketCount = getUserBucketCount(orders.getUserId());
|
||||||
|
orders.setBucket(userBucketCount);
|
||||||
return Result.success().put("data", orders);
|
return Result.success().put("data", orders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@
|
||||||
<select id="sumHasSafetyMoney" resultType="java.math.BigDecimal">
|
<select id="sumHasSafetyMoney" resultType="java.math.BigDecimal">
|
||||||
SELECT IFNULL(SUM(safety_money),0) FROM user_money
|
SELECT IFNULL(SUM(safety_money),0) FROM user_money
|
||||||
</select>
|
</select>
|
||||||
|
<select id="sumMoney" resultType="java.math.BigDecimal">
|
||||||
|
SELECT IFNULL(SUM(money), 0)
|
||||||
|
FROM user_money
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in a new issue