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"
|
||||
|
|
|
|||
26
README.md
26
README.md
|
|
@ -34,6 +34,32 @@
|
|||
- Eclipse、IDEA运行sqxApplication.java,则可启动项目
|
||||
- Swagger文档路径:http://localhost:8964/sqx_fast/swagger/index.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>
|
||||
|
|
|
|||
9
pom.xml
9
pom.xml
|
|
@ -406,11 +406,6 @@
|
|||
<artifactId>icbc-hsm</artifactId>
|
||||
<version>1.0.5</version>
|
||||
</dependency>
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>com.baidu.aip</groupId>-->
|
||||
<!-- <artifactId>java-sdk</artifactId>-->
|
||||
<!-- <version>4.11.3</version>-->
|
||||
<!--</dependency>-->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
@ -489,7 +484,7 @@
|
|||
<repository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
|
|
@ -499,7 +494,7 @@
|
|||
<pluginRepository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
|
|
|
|||
|
|
@ -345,6 +345,8 @@ public class UserController {
|
|||
//设置本年收入
|
||||
homeMessageResponse.setYearRevenue(userService.queryPayMoney(3));
|
||||
|
||||
//设置所有用户总金额
|
||||
homeMessageResponse.setTotalMoney(userMoneyService.sumMoney());
|
||||
return Result.success().put("data", homeMessageResponse);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,4 +19,9 @@ public interface UserMoneyDao extends BaseMapper<UserMoney> {
|
|||
|
||||
|
||||
BigDecimal sumHasSafetyMoney();
|
||||
|
||||
/**
|
||||
* 查询总金额
|
||||
*/
|
||||
BigDecimal sumMoney();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,4 +49,9 @@ public class HomeMessageResponse implements Serializable {
|
|||
*/
|
||||
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 java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
|
||||
public interface UserMoneyService extends IService<UserMoney> {
|
||||
|
||||
BigDecimal sumMoney();
|
||||
|
||||
UserMoney selectUserMoneyByUserId(Long userId);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal sumMoney() {
|
||||
return baseMapper.sumMoney();
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserMoney selectUserMoneyByUserId(Long 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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -118,7 +115,7 @@ public class Orders implements Serializable {
|
|||
/**
|
||||
* 无需验证码 完成订单的图片
|
||||
*/
|
||||
private String noCodeFinishImg;
|
||||
private String noCodeFinishImg;
|
||||
/**
|
||||
* 下单用户类型 1用户 2师傅
|
||||
*/
|
||||
|
|
@ -141,12 +138,15 @@ public class Orders implements Serializable {
|
|||
private String laundryPhone;
|
||||
|
||||
/**
|
||||
*是否已修改桶数量 0未修改 1已修改
|
||||
* 是否已修改桶数量 0未修改 1已修改
|
||||
*/
|
||||
private Integer isUpdateBucket;
|
||||
/**
|
||||
*是否已推送
|
||||
* 是否已推送
|
||||
*/
|
||||
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 jodd.util.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lombok.val;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.gavaghan.geodesy.Ellipsoid;
|
||||
import org.gavaghan.geodesy.GlobalCoordinates;
|
||||
|
|
@ -985,6 +986,8 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
orders.setLaundryPhone(laundry.getLaundryPhone());
|
||||
}
|
||||
}
|
||||
val userBucketCount = getUserBucketCount(orders.getUserId());
|
||||
orders.setBucket(userBucketCount);
|
||||
return Result.success().put("data", orders);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@
|
|||
<select id="sumHasSafetyMoney" resultType="java.math.BigDecimal">
|
||||
SELECT IFNULL(SUM(safety_money),0) FROM user_money
|
||||
</select>
|
||||
|
||||
<select id="sumMoney" resultType="java.math.BigDecimal">
|
||||
SELECT IFNULL(SUM(money), 0)
|
||||
FROM user_money
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in a new issue