Compare commits

..

No commits in common. '05f04aba67798341eab13075b8ae5204278cf054' and '4fcc2de2bb75aaab8dd215ad13cb0aa0614a3ee7' have entirely different histories.

  1. 5
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/app/AppProductOrderExpressController.java
  2. 2
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysAppBusinessProductController.java
  3. 5
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/ProductOrderVo.java
  4. 2
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/IProductOrderService.java
  5. 6
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/OrderDeliveryService.java
  6. 9
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/api/ProductOrderExpressApi.java
  7. 2
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/calculate/impl/DeliveryOrderCalculateService.java
  8. 2
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/calculate/impl/ExpressDeliveryOrderCalculateService.java
  9. 2
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/calculate/impl/SelfPickUpOrderCalculateService.java
  10. 6
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/AppBusinessProductServiceImpl.java
  11. 23
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/BusinessCouponTemplateServiceImpl.java
  12. 12
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/ProductOrderServiceImpl.java
  13. 17
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/PromotionCouponTemplateServiceImpl.java
  14. 7
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysWithdrawalServiceImpl.java
  15. 2
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/task/SysWithdrawalExecutor.java
  16. 2
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductOrderMapper.xml
  17. 3
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysBusinessMapper.xml
  18. 2
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUpdateRecordMapper.xml

5
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/app/AppProductOrderExpressController.java

@ -88,9 +88,8 @@ public class AppProductOrderExpressController extends BaseController {
*/
@Log(title = "订单快递", businessType = BusinessType.INSERT)
@GetMapping("speed/no")
public R<JSONArray> querySpeedByExpressNo(@RequestParam String expressNo, @RequestParam String expressCode, @RequestParam(required = false)String mobile,
@RequestParam String to, @RequestParam String form) {
return R.ok(productOrderExpressApi.querySpeedByExpressNo(expressNo, expressCode, mobile, to, form));
public R<JSONArray> querySpeedByExpressNo(@RequestParam String expressNo, @RequestParam String expressCode, @RequestParam(required = false)String mobile) {
return R.ok(productOrderExpressApi.querySpeedByExpressNo(expressNo, expressCode, mobile));
}

2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysAppBusinessProductController.java

@ -95,7 +95,7 @@ public class SysAppBusinessProductController extends BaseController {
@RepeatSubmit()
@GetMapping("off/shelf")
@SaCheckPermission("system:businessProduct:offShelf")
public R<Void> offForceShelf(ProductOffShelfBo bo) {
public R<Void> offForceShelf(@RequestBody ProductOffShelfBo bo) {
return toAjax(appBusinessProductService.offForceShelf(bo));
}

5
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/ProductOrderVo.java

@ -290,10 +290,5 @@ public class ProductOrderVo implements Serializable {
*退款失败时间
*/
private Date failRefundTime;
/**
* 商家退款反馈
*/
private String businessRefund;
}

2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/IProductOrderService.java

@ -11,7 +11,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Date;
import java.util.List;
/**
@ -202,5 +201,4 @@ public interface IProductOrderService {
void refundFailToFinish();
void updateConsigneeTimeById(Date date, Long productOrderId);
}

6
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/OrderDeliveryService.java

@ -14,7 +14,10 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
@Service
@RequiredArgsConstructor
@ -211,7 +214,6 @@ public class OrderDeliveryService {
deliveryOrderVo.setDispatcherName(deliveryStatusCallback.getDispatcherName());
deliveryOrderVo.setDispatcherMobile(deliveryStatusCallback.getDispatcherPhone());
productOrderService.updateStatusByOrderId("2", deliveryOrderVo.getOrderId());
productOrderService.updateConsigneeTimeById(new Date(), deliveryOrderVo.getOrderId());
}
case ("14") -> {
deliveryOrderVo.setDispatcherName(deliveryStatusCallback.getDispatcherName());

9
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/api/ProductOrderExpressApi.java

@ -638,9 +638,6 @@ public class ProductOrderExpressApi {
productOrderExpressVo.setStatus("4");
baseService.updateByVo(productOrderExpressVo);
}else if(status == 10){
Long productOrderId = productOrderExpressVo.getOrderId();
productOrderService.updateConsigneeTimeById(new Date(), productOrderId);
}
baseService.updateByVo(productOrderExpressVo);
@ -717,15 +714,13 @@ public class ProductOrderExpressApi {
}
public JSONArray querySpeedByExpressNo(String expressNo, String expressCode, String mobile, String to, String from) {
public JSONArray querySpeedByExpressNo(String expressNo, String expressCode, String mobile) {
String key = kuaidi100Configuration.getKey();
String customer = kuaidi100Configuration.getCustomer();
QueryTrackReq queryTrackReq = new QueryTrackReq();
QueryTrackParam queryTrackParam = new QueryTrackParam();
queryTrackParam.setCom(expressCode);
queryTrackParam.setNum(expressNo);
queryTrackParam.setTo(to);
queryTrackParam.setFrom(from);
if(StringUtils.isNotEmpty(mobile)){
queryTrackParam.setPhone(mobile);
}
@ -735,7 +730,7 @@ public class ProductOrderExpressApi {
queryTrackReq.setCustomer(customer);
queryTrackReq.setSign(SignUtils.querySign(param ,key,customer));
log.info("快递请求参数:{}", queryTrackReq);
IBaseClient baseClient = new QueryTrackMap();
IBaseClient baseClient = new QueryTrack();
HttpResult execute = null;
try {
execute = baseClient.execute(queryTrackReq);

2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/calculate/impl/DeliveryOrderCalculateService.java

@ -247,7 +247,7 @@ public class DeliveryOrderCalculateService implements OrderCalculateService {
refundService.refundByVo(productOrderRefundVo);
}
}else if(productOrderVo.getStatus().equals("4") || productOrderVo.getStatus().equals("11")){
}else if(productOrderVo.getStatus().equals("4")){
ProductOrderPriceVo productOrderPriceVo = productOrderVo.getProductOrderPriceVo();
BigDecimal currentPrice = productOrderPriceVo.getCurrentPrice();
BigDecimal payPrice = productOrderPriceVo.getPayPrice();

2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/calculate/impl/ExpressDeliveryOrderCalculateService.java

@ -216,7 +216,7 @@ public class ExpressDeliveryOrderCalculateService implements OrderCalculateServi
refundService.refundByVo(productOrderRefundVo);
}
}else if(productOrderVo.getStatus().equals("4") || productOrderVo.getStatus().equals("11")){
}else if(productOrderVo.getStatus().equals("4")){
ProductOrderPriceVo productOrderPriceVo = productOrderVo.getProductOrderPriceVo();
BigDecimal currentPrice = productOrderPriceVo.getCurrentPrice();
BigDecimal payPrice = productOrderPriceVo.getPayPrice();

2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/calculate/impl/SelfPickUpOrderCalculateService.java

@ -132,7 +132,7 @@ public class SelfPickUpOrderCalculateService implements OrderCalculateService {
productOrderRefundVo.setRefundNo(OrderNoUtils.getOrderNo("R"));
productOrderVo.setStatus("3");
refundService.refundByVo(productOrderRefundVo);
}else if(productOrderVo.getStatus().equals("4") || productOrderVo.getStatus().equals("11")){
}else if(productOrderVo.getStatus().equals("4")){
ProductOrderPriceVo productOrderPriceVo = productOrderVo.getProductOrderPriceVo();
BigDecimal currentPrice = productOrderPriceVo.getCurrentPrice();
BigDecimal payPrice = productOrderPriceVo.getPayPrice();

6
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/AppBusinessProductServiceImpl.java

@ -237,9 +237,6 @@ public class AppBusinessProductServiceImpl implements IAppBusinessProductService
bo.setCategories(appCategoryVo.getCategories());
}
bo.setStatus(vo.getStatus());
if(vo.getStatus().equals("2") || vo.getStatus().equals("4")){
bo.setStatus("0");
}
}
/**
@ -655,7 +652,8 @@ public class AppBusinessProductServiceImpl implements IAppBusinessProductService
UpdateWrapper<AppBusinessProduct> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("id", bo.getId())
.set("status", "4")
.set("record_msg", bo.getRemark());
.set("record_msg", bo.getRemark())
.eq("is_sale", 1);
return baseMapper.update(updateWrapper);
}

23
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/BusinessCouponTemplateServiceImpl.java

@ -16,11 +16,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.dromara.system.domain.BusinessCoupon;
import org.dromara.system.domain.ProductOrder;
import org.dromara.system.domain.bo.*;
import org.dromara.system.domain.vo.*;
import org.dromara.system.mapper.BusinessCouponMapper;
import org.dromara.system.mapper.ProductOrderMapper;
import org.dromara.system.service.IAppBusinessProductService;
import org.dromara.system.service.IAppBusinessTypeService;
import org.dromara.system.service.IBusinessCouponService;
@ -57,8 +55,6 @@ public class BusinessCouponTemplateServiceImpl implements IBusinessCouponTemplat
@Resource
private IAppBusinessTypeService appBusinessTypeService;
@Resource
private ProductOrderMapper productOrderMapper;
//构造范围信息
private void buildProductScopeInfo(BusinessCouponTemplateVo businessCouponVo) {
if(StringUtils.isNotBlank(businessCouponVo.getProductScope())){
@ -154,23 +150,8 @@ public class BusinessCouponTemplateServiceImpl implements IBusinessCouponTemplat
lqw.apply(bo.getEffective() != null && bo.getEffective(),
"date_format(valid_start_time , '%y-%m-%d') <= date_format(now(), '%y-%m-%d') and date_format(valid_end_time , '%y-%m-%d') >= date_format(now(), '%y-%m-%d') and (total_count >= take_count or total_count = -1) ");
//用户可领取
lqw.apply(bo.getCanTake() != null && bo.getCanTake() ,
" (total_count = -1 or total_count > 0)");
if( bo.getUserId() != null && bo.getUserId() != 0L){
LambdaQueryWrapper<ProductOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ProductOrder::getBusinessId, bo.getBusinessId());
queryWrapper.eq(ProductOrder::getIsPay, "1");
Long count = productOrderMapper.selectCount(queryWrapper);
lqw.apply(bo.getCanTake() != null && bo.getCanTake() ,
" (take_limit_count = -1 or take_limit_count >= (select count(bc.id) from business_coupon bc where bc.template_id = id and bc.user_id = {0} and bc.del_flag = '0' )) " +
" and ( product_scope_type in (1, 2, 3, 4) or ( product_scope_type = 5 and 0 = {1}))", bo.getUserId(), count);
}else if(bo.getUserId() != null){
lqw.apply(bo.getCanTake() != null && bo.getCanTake() ,
" (take_limit_count = -1 )");
}
lqw.apply(bo.getCanTake() != null && bo.getCanTake() && bo.getUserId() != null,
" (total_count = -1 or total_count > 0) and (take_limit_count = -1 or take_limit_count >= (select count(bc.id) from business_coupon bc where bc.template_id = id and bc.user_id = {0} and bc.del_flag = '0' )) ", bo.getUserId());
if(bo.getLimit() != null && bo.getLimit() > 0){
lqw.last("limit " + bo.getLimit());
}

12
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/ProductOrderServiceImpl.java

@ -259,9 +259,7 @@ public class ProductOrderServiceImpl implements IProductOrderService {
lqw.eq(bo.getSettlement() != null, ProductOrder::getSettlement, bo.getSettlement());
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), ProductOrder::getStatus, bo.getStatus());
lqw.eq(StringUtils.isNotBlank(bo.getShowBusiness()), ProductOrder::getShowBusiness, bo.getShowBusiness());
if (bo.getStartRefundTime() != null) {
lqw.lt(ProductOrder::getStartRefundTime, DateUtil.offsetDay(bo.getStartRefundTime(), -2).toJdkDate());
}
lqw.lt(bo.getStartRefundTime() != null, ProductOrder::getStartRefundTime, DateUtil.offsetDay(bo.getStartRefundTime(), -2).toJdkDate());
lqw.apply(StringUtils.isNotBlank(bo.getKeyworkds()), "locate({0}, order_no) > 0 or locate({0}, mobile) > 0 or locate({0}, product_name) > 0 ", bo.getKeyworkds());
return lqw;
}
@ -1095,14 +1093,6 @@ public class ProductOrderServiceImpl implements IProductOrderService {
}
}
@Override
public void updateConsigneeTimeById(Date date, Long id) {
LambdaUpdateWrapper<ProductOrder> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(ProductOrder::getId, id);
updateWrapper.set(ProductOrder::getConsigneeTime, date);
baseMapper.update(updateWrapper);
}
private ProductOrderVo insertOrderByVo(ProductOrderVo vo) {

17
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/PromotionCouponTemplateServiceImpl.java

@ -15,13 +15,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.dromara.system.domain.BusinessCoupon;
import org.dromara.system.domain.PromotionCoupon;
import org.dromara.system.domain.SysUser;
import org.dromara.system.domain.bo.AppCategoryBo;
import org.dromara.system.domain.bo.BusinessCouponTemplateBo;
import org.dromara.system.domain.bo.SysBusinessBo;
import org.dromara.system.domain.vo.*;
import org.dromara.system.mapper.PromotionCouponMapper;
import org.dromara.system.mapper.SysUserMapper;
import org.dromara.system.service.IAppCategoryService;
import org.dromara.system.service.ISysBusinessService;
import org.springframework.stereotype.Service;
@ -54,8 +52,6 @@ public class PromotionCouponTemplateServiceImpl implements IPromotionCouponTempl
@Resource
private ISysBusinessService sysBusinessService;
@Resource
private SysUserMapper sysUserMapper;
/**
* 构造范围信息
@ -151,17 +147,8 @@ public class PromotionCouponTemplateServiceImpl implements IPromotionCouponTempl
lqw.apply(bo.getEffective() != null && bo.getEffective(),
"date_format(valid_start_time , '%y-%m-%d') <= date_format(now(), '%y-%m-%d') and date_format(valid_end_time , '%y-%m-%d') >= date_format(now(), '%y-%m-%d') and (total_count >= take_count or total_count = -1)");
//用户可领取
lqw.apply(bo.getCanTake() != null && bo.getCanTake(), " (total_count = -1 or total_count > 0)");
if(bo.getUserId() != null && bo.getUserId() != 0L){
SysUser sysUser = sysUserMapper.selectById(bo.getUserId());
lqw.apply(
" (take_limit_count = -1 or take_limit_count >= (select count(bc.id) from promotion_coupon bc where bc.template_id = id and bc.user_id = {0} )) " +
"and ( product_scope_type in (1, 2, 3) or (product_scope_type = 4 and date_format(register_date, '%y-%m-%d') <= date_format({1}, '%y-%m-%d')))",
bo.getUserId(), sysUser.getCreateTime());
}else if (bo.getUserId() != null){
lqw.apply(
" (take_limit_count = -1 ");
}
lqw.apply(bo.getCanTake() != null && bo.getCanTake() && bo.getUserId() != null,
" (total_count = -1 or total_count > 0) and (take_limit_count = -1 or take_limit_count >= (select count(bc.id) from promotion_coupon bc where bc.template_id = id and bc.user_id = {0} )) ", bo.getUserId());
return lqw;
}

7
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysWithdrawalServiceImpl.java

@ -72,7 +72,11 @@ public class SysWithdrawalServiceImpl implements ISysWithdrawalService {
private ISysBankService sysBankService;
@Resource
private ISysBusinessService sysBusinessService;
@Resource
private ISysSocialService sysSocialService;
@Resource
private ISysConfigService sysConfigService;
@Resource
@ -436,10 +440,9 @@ public class SysWithdrawalServiceImpl implements ISysWithdrawalService {
@Override
@Transactional
public void cancelWxByAgreeTime() {
String time = sysConfigService.selectConfigByKey("withdrawal.rejected.time");
LambdaQueryWrapper<SysWithdrawal> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SysWithdrawal::getStatus, 1);
queryWrapper.le(SysWithdrawal::getAgreeTime, DateUtil.offsetHour(new Date(), -Integer.parseInt(time)).toJdkDate());
queryWrapper.le(SysWithdrawal::getAgreeTime, DateUtil.offsetDay(new Date(), -1).toJdkDate());
queryWrapper.isNotNull(SysWithdrawal::getAgreeTime);
queryWrapper.eq(SysWithdrawal::getType, 1);
List<SysWithdrawalVo> sysWithdrawalVos = baseMapper.selectVoList(queryWrapper);

2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/task/SysWithdrawalExecutor.java

@ -42,7 +42,7 @@ import java.util.List;
public class SysWithdrawalExecutor extends BaseController {
@Resource
private ISysWithdrawalService sysWithdrawalService;
@Scheduled(cron = "0 */30 * * * ?")
@Scheduled(cron = "0 * * * * ?")
public void run(){
log.info("定时处理同意未提现的订单...开始:{}", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
sysWithdrawalService.cancelWxByAgreeTime();

2
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/ProductOrderMapper.xml

@ -284,7 +284,6 @@
<result column="delivery_price" property="deliveryPrice"></result>
<result column="service_price" property="servicePrice"></result>
<result column="express_price" property="expressPrice"></result>
<result column="refund_price" property="refundPrice"></result>
<result column="settlement_current_price" property="settlementCurrentPrice"></result>
<result column="total_num" property="totalNum"></result>
</resultMap>
@ -295,7 +294,6 @@
sum(pop.business_discount_price ) as business_discount_price,
sum(pop.package_price ) as package_price,
sum(pop.delivery_price ) as delivery_price,
sum(pop.refund_price ) as refund_price,
sum(pop.service_price ) as service_price,
sum(pop.express_price ) as express_price,
sum(pop.settlement_current_price ) as settlement_current_price,

3
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysBusinessMapper.xml

@ -66,7 +66,7 @@
and find_in_set(#{bo.categoryId}, categories)
</if>
<if test="bo.type != null ">
and category_id in (select ac.id from app_category ac where ac.type = #{bo.type} and ac.del_flag= '0' group by ac.id)
and category_id in (select ac.id from app_category ac where ac.type = #{bo.type} and ac.del_flag= '0')
</if>
<if test="bo.translate != null ">
and translate = #{bo.translate}
@ -113,6 +113,7 @@
<if test="bo.endDistance != null ">
#{bo.endDistance, jdbcType = BIGINT} >= distance
</if>
</select>
<select id="byId" resultMap="businessVo" parameterType="java.lang.Long">
select id, user_id, name, leader, mobile, area, address, lng, lat, business_license_image,

2
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUpdateRecordMapper.xml

@ -11,7 +11,7 @@
</resultMap>
<sql id="selectSysUpdateRecordVo">
select id, title, content, del_flag, create_dept, create_by, create_time, update_by, update_time from sys_update_record
select id, titile, content, del_flag, create_dept, create_by, create_time, update_by, update_time from sys_update_record
</sql>

Loading…
Cancel
Save