Browse Source

查询时间范围内当前店铺的交易记录

dev
wangfukang 11 months ago
parent
commit
1ca94ef87d
  1. 12
      hiver-admin/src/main/resources/application.yml
  2. 16
      hiver-admin/test-output/test-report.html
  3. 6
      hiver-core/src/main/java/cc/hiver/core/logisticsorder/entity/LogisticsOrder.java
  4. 10
      hiver-core/src/main/resources/mapper/LogisticsOrderMapper.xml
  5. 6
      hiver-modules/hiver-base/src/main/java/cc/hiver/base/controller/common/CaptchaController.java
  6. 15
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/DealingsRecordController.java
  7. 1
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/LogiticsCompanyController.java
  8. 11
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/DealingsRecordMapper.java
  9. 10
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/DealingsRecordService.java
  10. 14
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/DealingsRecordServiceImpl.java
  11. 13
      hiver-modules/hiver-mall/src/main/resources/mapper/DealingsRecordMapper.xml

12
hiver-admin/src/main/resources/application.yml

@ -25,8 +25,8 @@ spring:
timeout-per-shutdown-phase: 10S
# 数据源
datasource:
# url: jdbc:mysql://154.8.162.157:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true
url: jdbc:mysql://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true
url: jdbc:mysql://154.8.162.157:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true
# url: jdbc:mysql://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true
username: reddoor
# Jasypt加密 可到common-utils中找到JasyptUtil加解密工具类生成加密结果 格式为ENC(加密结果) 以下解密结果为123456
password: ENC(Zla4U4+yRLPhicvuX2TmiEgxEpzP4dk8BHzFDEtiEhwLQIIaftZrrEUJZce6efoe)
@ -67,8 +67,8 @@ spring:
ddl-auto: update
# Redis 若设有密码自行添加配置password
redis:
# host: 154.8.162.157
host: 8.140.198.243
host: 154.8.162.157
# host: 8.140.198.243
password: reddoor168
# 数据库索引 默认0
database: 1
@ -265,8 +265,8 @@ wx:
# redis前缀配置: wx(默认)
key-prefix: wx
redis:
# host: 154.8.162.157
host: 8.140.198.243
host: 154.8.162.157
# host: 8.140.198.243
password: reddoor168
# 数据库索引 默认0
database: 1

16
hiver-admin/test-output/test-report.html

@ -35,7 +35,7 @@
<a href="#"><span class="badge badge-primary">Hiver</span></a>
</li>
<li class="m-r-10">
<a href="#"><span class="badge badge-primary">三月 31, 2025 22:27:43</span></a>
<a href="#"><span class="badge badge-primary">五月 11, 2025 19:30:10</span></a>
</li>
</ul>
</div>
@ -84,7 +84,7 @@
<div class="test-detail">
<span class="meta text-white badge badge-sm"></span>
<p class="name">passTest</p>
<p class="text-sm"><span>22:27:44 下午</span> / <span>0.028 secs</span></p>
<p class="text-sm"><span>19:30:11 下午</span> / <span>0.016 secs</span></p>
</div>
<div class="test-contents d-none">
<div class="detail-head">
@ -92,9 +92,9 @@
<div class="info">
<div class='float-right'><span class='badge badge-default'>#test-id=1</span></div>
<h5 class="test-status text-pass">passTest</h5>
<span class='badge badge-success'>03.31.2025 22:27:44</span>
<span class='badge badge-danger'>03.31.2025 22:27:44</span>
<span class='badge badge-default'>0.028 secs</span>
<span class='badge badge-success'>05.11.2025 19:30:11</span>
<span class='badge badge-danger'>05.11.2025 19:30:11</span>
<span class='badge badge-default'>0.016 secs</span>
</div>
<div class="m-t-10 m-l-5"></div>
</div>
@ -104,7 +104,7 @@
<tbody>
<tr class="event-row">
<td><span class="badge log pass-bg">Pass</span></td>
<td>22:27:44</td>
<td>19:30:11</td>
<td>
Test passed
</td>
@ -128,13 +128,13 @@
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Started</p>
<h3>三月 31, 2025 22:27:43</h3>
<h3>五月 11, 2025 19:30:10</h3>
</div></div>
</div>
<div class="col-md-3">
<div class="card"><div class="card-body">
<p class="m-b-0">Ended</p>
<h3>三月 31, 2025 22:27:44</h3>
<h3>五月 11, 2025 19:30:11</h3>
</div></div>
</div>
<div class="col-md-3">

6
hiver-core/src/main/java/cc/hiver/core/logisticsorder/entity/LogisticsOrder.java

@ -212,4 +212,10 @@ public class LogisticsOrder{
@ApiModelProperty(value = "修改记录数")
private String changeCount;
@ApiModelProperty(value = "落地费规则(每公斤/元)")
private String landingFee;
@ApiModelProperty(value = "送货费规则")
private String deliveryFee;
}

10
hiver-core/src/main/resources/mapper/LogisticsOrderMapper.xml

@ -44,6 +44,8 @@
<result column="shipper_id" jdbcType="VARCHAR" property="shipperId" />
<result column="receiver_id" jdbcType="VARCHAR" property="receiverId" />
<result column="weight_history" jdbcType="VARCHAR" property="weightHistory" />
<result column="landing_fee" jdbcType="VARCHAR" property="landingFee" />
<result column="delivery_fee" jdbcType="VARCHAR" property="deliveryFee" />
</resultMap>
<sql id="Base_Column_List">
@ -52,7 +54,7 @@
go_station_id, go_station_name, arrival_station_id, arrival_station_name, weight, count, freight, premium,
transit_fee, tips, method_of_settlement, cost, all_cost, order_number, object_name, remark, receiving_user_id,
receiving_user_name,image_path, payment_for_goods, transfer_addition,order_status,
shipper_id,receiver_id,weight_history
shipper_id,receiver_id,weight_history,landing_fee,delivery_fee
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
@ -73,7 +75,7 @@
shipper_name, shipper_mobile, shipper_address, receiver_name, receiver_mobile, receiver_address,
go_station_id, go_station_name, arrival_station_id, arrival_station_name, weight, count, freight, premium,
transit_fee, tips, method_of_settlement, cost, all_cost, order_number, object_name, remark, receiving_user_id, receiving_user_name,
image_path, payment_for_goods, transfer_addition,order_status,shipper_id,receiver_id,weight_history)
image_path, payment_for_goods, transfer_addition,order_status,shipper_id,receiver_id,weight_history,landing_fee,delivery_fee)
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createByName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{companyId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{circuitId,jdbcType=VARCHAR}, #{circuitName,jdbcType=VARCHAR},
@ -84,7 +86,8 @@
#{transitFee,jdbcType=DECIMAL}, #{tips,jdbcType=DECIMAL}, #{methodOfSettlement,jdbcType=VARCHAR}, #{cost,jdbcType=DECIMAL},
#{allCost,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR}, #{objectName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{receivingUserId,jdbcType=VARCHAR}, #{receivingUserName,jdbcType=VARCHAR},#{imagePath,jdbcType=VARCHAR}, #{paymentForGoods,jdbcType=VARCHAR},
#{transferAddition,jdbcType=VARCHAR},#{orderStatus,jdbcType=VARCHAR},#{shipperId,jdbcType=VARCHAR},#{receiverId,jdbcType=VARCHAR},#{weightHistory,jdbcType=VARCHAR})
#{transferAddition,jdbcType=VARCHAR},#{orderStatus,jdbcType=VARCHAR},#{shipperId,jdbcType=VARCHAR},#{receiverId,jdbcType=VARCHAR},#{weightHistory,jdbcType=VARCHAR},
#{landingFee,jdbcType=VARCHAR},#{deliveryFee,jdbcType=VARCHAR})
</insert>
<!--管理商品分页列表-->
@ -107,6 +110,7 @@
t.go_station_id, t.go_station_name, t.arrival_station_id, t.arrival_station_name, t.weight, t.count, t.freight, t.premium,
t.transit_fee, t.tips, t.method_of_settlement, t.cost, t.all_cost, t.order_number, t.object_name, t.remark, t.receiving_user_id,
t.receiving_user_name,t.image_path, t.payment_for_goods, t.transfer_addition,t.order_status,t.shipper_id,t.receiver_id,t.weight_history,
t.landing_fee,t.delivery_fee,
COALESCE(occ.change_count, 0) AS change_count
from t_logistics_order t
LEFT JOIN

6
hiver-modules/hiver-base/src/main/java/cc/hiver/base/controller/common/CaptchaController.java

@ -84,14 +84,14 @@ public class CaptchaController {
public Result sendRegistSmsCode(@PathVariable String mobile, HttpServletRequest request) {
// 默认只有店铺注册
final String type = UserConstant.USER_TYPE_NORMAL;
return sendSms(mobile,type, MessageConstant.SMS_RANGE_UNREG, SettingConstant.SMS_TYPE.SMS_COMMON.name(), request);
return sendSms(mobile,type, MessageConstant.SMS_RANGE_UNREG, SettingConstant.SMS_TYPE.SMS_REGISTER.name(), request);
}
@RequestMapping(value = "/sendLoginSms/{mobile}", method = RequestMethod.GET)
@ApiOperation(value = "发送登录短信验证码")
@RateLimiter(name = "sendLoginSms", rate = 1, ipLimit = true)
public Result sendLoginSmsCode(@PathVariable String mobile ,String type, HttpServletRequest request) {
return sendSms(mobile,type, MessageConstant.SMS_RANGE_REG, SettingConstant.SMS_TYPE.SMS_COMMON.name(), request);
return sendSms(mobile,type, MessageConstant.SMS_RANGE_REG, SettingConstant.SMS_TYPE.SMS_LOGIN.name(), request);
}
@RequestMapping(value = "/sendResetSms/{mobile}", method = RequestMethod.GET)
@ -106,7 +106,7 @@ public class CaptchaController {
if (userService.findByMobile(mobile) != null) {
return ResultUtil.error("该手机号已绑定账户");
}
return sendSms(mobile,type, MessageConstant.SMS_RANGE_ALL, SettingConstant.SMS_TYPE.SMS_COMMON.name(), request);
return sendSms(mobile,type, MessageConstant.SMS_RANGE_ALL, SettingConstant.SMS_TYPE.SMS_CHANGE_PASS.name(), request);
}
/**

15
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/DealingsRecordController.java

@ -69,6 +69,21 @@ public class DealingsRecordController {
return new ResultUtil<List<DealingsRecord>>().setData(dealingsRecords);
}
/**
* 查询时间范围内当前店铺的交易记录
* @author 王富康
* @date 2025/5/11
* @param startTime
* @param endTime
* @return Result
*/
@RequestMapping(value = "/getDealingsRecordListByTimeRange", method = RequestMethod.POST)
@ApiOperation("查询时间范围内当前店铺的交易记录")
public Result getDealingsRecordListByTimeRange(String startTime, String endTime) {
final List<DealingsRecord> dealingsRecords = dealingsRecordService.getDealingsRecordListByTimeRange(startTime,endTime);
return new ResultUtil<List<DealingsRecord>>().setData(dealingsRecords);
}
/**
* 删除指定交易记录
*

1
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/LogiticsCompanyController.java

@ -232,6 +232,7 @@ public class LogiticsCompanyController {
try {
LogiticsCompany oldLogiticsCompany = companyService.findById(logiticsCompany.getId());
oldLogiticsCompany.setPrintMethod(logiticsCompany.getPrintMethod());
oldLogiticsCompany.setRemark(logiticsCompany.getRemark());
companyService.update(oldLogiticsCompany);
return ResultUtil.success("修改成功");
} catch (Exception e) {

11
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/DealingsRecordMapper.java

@ -73,4 +73,15 @@ public interface DealingsRecordMapper extends BaseMapper<DealingsRecord> {
BigDecimal getArrearsByUserId(@Param("customerBillQueryVo") CustomerBillQueryVo customerBillQueryVo);
BigDecimal getArrearsBySupplierId(@Param("supplierBillQueryVo") SupplierBillQueryVo supplierBillQueryVo);
/**
* 查询时间范围内当前店铺的交易记录
* @author 王富康
* @date 2025/5/11
* @param shopId
* @param startTime
* @param endTime
* @return List<DealingsRecord>
*/
List<DealingsRecord> getDealingsRecordListByTimeRange(@Param("shopId")String shopId,@Param("startTime") String startTime,@Param("endTime") String endTime);
}

10
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/DealingsRecordService.java

@ -83,4 +83,14 @@ public interface DealingsRecordService extends IService<DealingsRecord> {
* @date 2024/7/6
*/
BigDecimal getArrearsBySupplierId(SupplierBillQueryVo supplierBillQueryVo);
/**
* 查询时间范围内当前店铺的交易记录
* @author 王富康
* @date 2025/5/11
* @param startTime
* @param endTime
* @return List<DealingsRecord>
*/
List<DealingsRecord> getDealingsRecordListByTimeRange(String startTime, String endTime);
}

14
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/DealingsRecordServiceImpl.java

@ -95,4 +95,18 @@ public class DealingsRecordServiceImpl extends ServiceImpl<DealingsRecordMapper,
return dealingsRecordMapper.getArrearsBySupplierId(supplierBillQueryVo);
}
/**
* 查询时间范围内当前店铺的交易记录
* @author 王富康
* @date 2025/5/11
* @param startTime
* @param endTime
* @return List<DealingsRecord>
*/
@Override
public List<DealingsRecord> getDealingsRecordListByTimeRange(String startTime, String endTime) {
final String shopId = securityUtil.getShopId();
return dealingsRecordMapper.getDealingsRecordListByTimeRange(shopId, startTime, endTime);
}
}

13
hiver-modules/hiver-mall/src/main/resources/mapper/DealingsRecordMapper.xml

@ -126,6 +126,19 @@
order by create_time desc
</select>
<select id="getDealingsRecordListByTimeRange" resultType="cc.hiver.mall.entity.DealingsRecord">
select
<include refid="Base_Column_List"/>
from t_dealings_record
where
<!--20240802 排除掉删除的交易记录-->
del_flag != 2
and user_type ='1'
and shop_id = #{shopId}
and create_time BETWEEN #{startTime} AND #{endTime}
order by create_time desc
</select>
<!-- cancelRecord-->
<update id="cancelRecord">
update t_dealings_record

Loading…
Cancel
Save