bug fix
This commit is contained in:
@@ -177,6 +177,11 @@ json渲染表单以及是否需要编辑数据回填的功能以下为例
|
|||||||
## 后台账号 demo 密码 crmeb.com, 请大家不要随意改密码!
|
## 后台账号 demo 密码 crmeb.com, 请大家不要随意改密码!
|
||||||
#### 请大家不要随意改密码!请大家不要随意改密码!请大家不要随意改密码!
|
#### 请大家不要随意改密码!请大家不要随意改密码!请大家不要随意改密码!
|
||||||
|
|
||||||
|
请关注我们
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
## 参与开发
|
## 参与开发
|
||||||
|
|
||||||
请参阅 [CRMEB](https://github.com/crmeb/crmeb_java)。
|
请参阅 [CRMEB](https://github.com/crmeb/crmeb_java)。
|
||||||
|
|||||||
0
admin/tree.text
Normal file
0
admin/tree.text
Normal file
@@ -354,6 +354,7 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
storeOrderStatusService.createLog(existStoreOrder.getId(), Constants.ORDER_LOG_REFUND_APPLY,"用户申请退款原因:" + request.getRefund_reason_wap_explain());
|
storeOrderStatusService.createLog(existStoreOrder.getId(), Constants.ORDER_LOG_REFUND_APPLY,"用户申请退款原因:" + request.getRefund_reason_wap_explain());
|
||||||
|
|
||||||
existStoreOrder.setRefundStatus(1);
|
existStoreOrder.setRefundStatus(1);
|
||||||
|
existStoreOrder.setStatus(-1);
|
||||||
existStoreOrder.setRefundReasonTime(DateUtil.nowDateTime());
|
existStoreOrder.setRefundReasonTime(DateUtil.nowDateTime());
|
||||||
existStoreOrder.setRefundReasonWap(request.getText());
|
existStoreOrder.setRefundReasonWap(request.getText());
|
||||||
existStoreOrder.setRefundReasonWapExplain(request.getRefund_reason_wap_explain());
|
existStoreOrder.setRefundReasonWapExplain(request.getRefund_reason_wap_explain());
|
||||||
@@ -367,7 +368,7 @@ public class OrderServiceImpl implements OrderService {
|
|||||||
boolean codeResult = smsService.pushCodeToList(currentUser.getPhone(),1, smsInfo);
|
boolean codeResult = smsService.pushCodeToList(currentUser.getPhone(),1, smsInfo);
|
||||||
if(!codeResult) throw new CrmebException("短信加入发送队列失败");
|
if(!codeResult) throw new CrmebException("短信加入发送队列失败");
|
||||||
|
|
||||||
redisUtil.lPush(Constants.ORDER_TASK_REDIS_KEY_AFTER_REFUND_BY_USER, existStoreOrder.getId());
|
// redisUtil.lPush(Constants.ORDER_TASK_REDIS_KEY_AFTER_REFUND_BY_USER, existStoreOrder.getId());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -222,7 +222,6 @@ public class OrderPayServiceImpl extends PayService implements OrderPayService {
|
|||||||
|
|
||||||
//增加经验、积分
|
//增加经验、积分
|
||||||
updateFounds();
|
updateFounds();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class StoreProductReplyController {
|
|||||||
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
||||||
public CommonResult<String> save(
|
public CommonResult<String> save(
|
||||||
@RequestBody @Validated StoreProductReplyAddRequest request){
|
@RequestBody @Validated StoreProductReplyAddRequest request){
|
||||||
if(storeProductReplyService.create(request)){
|
if(storeProductReplyService.virtualCreate(request)){
|
||||||
return CommonResult.success();
|
return CommonResult.success();
|
||||||
}else{
|
}else{
|
||||||
return CommonResult.failed();
|
return CommonResult.failed();
|
||||||
|
|||||||
@@ -55,4 +55,10 @@ public class StoreProductReplyAddRequest implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "评论图片", required = true)
|
@ApiModelProperty(value = "评论图片", required = true)
|
||||||
private String pics;
|
private String pics;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "评论人头像 [虚拟评论参数]")
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "评论人昵称 [虚拟评论参数]")
|
||||||
|
private String nickname;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,13 @@ public interface StoreProductReplyService extends IService<StoreProductReply> {
|
|||||||
|
|
||||||
boolean create(StoreProductReplyAddRequest request);
|
boolean create(StoreProductReplyAddRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加虚拟评论
|
||||||
|
* @param request 评论参数
|
||||||
|
* @return 评论结果
|
||||||
|
*/
|
||||||
|
boolean virtualCreate(StoreProductReplyAddRequest request);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询是否已经回复
|
* 查询是否已经回复
|
||||||
* @param unique
|
* @param unique
|
||||||
|
|||||||
@@ -228,12 +228,6 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderDao, StoreOrder
|
|||||||
if(null != storeOrder.getPayTime()){
|
if(null != storeOrder.getPayTime()){
|
||||||
lqw.eq(StoreOrder::getPayTime, storeOrder.getPayTime());
|
lqw.eq(StoreOrder::getPayTime, storeOrder.getPayTime());
|
||||||
}
|
}
|
||||||
if(null != storeOrder.getPaid()){
|
|
||||||
lqw.eq(StoreOrder::getPaid, storeOrder.getPaid());
|
|
||||||
}
|
|
||||||
// if(null != storeOrder.getStatus()){
|
|
||||||
// lqw.eq(StoreOrder::getStatus, storeOrder.getStatus());
|
|
||||||
// }
|
|
||||||
if(null != storeOrder.getStoreId()){
|
if(null != storeOrder.getStoreId()){
|
||||||
lqw.eq(StoreOrder::getStoreId, storeOrder.getStoreId());
|
lqw.eq(StoreOrder::getStoreId, storeOrder.getStoreId());
|
||||||
}
|
}
|
||||||
@@ -851,7 +845,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderDao, StoreOrder
|
|||||||
public boolean refundRefuse(Integer id, String reason) {
|
public boolean refundRefuse(Integer id, String reason) {
|
||||||
StoreOrder storeOrder = getInfoException(id);
|
StoreOrder storeOrder = getInfoException(id);
|
||||||
storeOrder.setRefundReason(reason);
|
storeOrder.setRefundReason(reason);
|
||||||
storeOrder.setRefundStatus(4);
|
storeOrder.setRefundStatus(0);
|
||||||
|
storeOrder.setStatus(1);
|
||||||
updateById(storeOrder);
|
updateById(storeOrder);
|
||||||
|
|
||||||
storeOrderStatusService.createLog(storeOrder.getId(), Constants.ORDER_LOG_REFUND_REFUSE, Constants.ORDER_LOG_MESSAGE_REFUND_REFUSE.replace("{reason}", reason));
|
storeOrderStatusService.createLog(storeOrder.getId(), Constants.ORDER_LOG_REFUND_REFUSE, Constants.ORDER_LOG_MESSAGE_REFUND_REFUSE.replace("{reason}", reason));
|
||||||
@@ -1321,7 +1316,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderDao, StoreOrder
|
|||||||
break;
|
break;
|
||||||
case Constants.ORDER_STATUS_H5_REFUND: // 退款
|
case Constants.ORDER_STATUS_H5_REFUND: // 退款
|
||||||
queryWrapper.eq(StoreOrder::getPaid, true);
|
queryWrapper.eq(StoreOrder::getPaid, true);
|
||||||
queryWrapper.gt(StoreOrder::getRefundStatus, 0); //大于0
|
queryWrapper.in(StoreOrder::getRefundStatus, "1,2"); //大于0
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
queryWrapper.eq(StoreOrder::getIsDel, false);
|
queryWrapper.eq(StoreOrder::getIsDel, false);
|
||||||
@@ -1532,6 +1527,29 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderDao, StoreOrder
|
|||||||
map.put("value", Constants.ORDER_STATUS_STR_REFUNDED);
|
map.put("value", Constants.ORDER_STATUS_STR_REFUNDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(storeOrder.getPaid()
|
||||||
|
&& storeOrder.getStatus() == 0
|
||||||
|
&& !storeOrder.getIsDel()
|
||||||
|
&& !storeOrder.getIsSystemDel()){
|
||||||
|
map.put("key", Constants.ORDER_STATUS_NOT_SHIPPED);
|
||||||
|
map.put("value", Constants.ORDER_STATUS_STR_NOT_SHIPPED);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(storeOrder.getPaid()
|
||||||
|
&& storeOrder.getStatus() == 1
|
||||||
|
&& !storeOrder.getIsDel()
|
||||||
|
&& !storeOrder.getIsSystemDel()){
|
||||||
|
map.put("key", Constants.ORDER_STATUS_SPIKE);
|
||||||
|
map.put("value", Constants.ORDER_STATUS_STR_SPIKE);
|
||||||
|
}
|
||||||
|
if(storeOrder.getPaid()
|
||||||
|
&& storeOrder.getStatus() == 2
|
||||||
|
&& !storeOrder.getIsDel()
|
||||||
|
&& !storeOrder.getIsSystemDel()){
|
||||||
|
map.put("key", Constants.ORDER_STATUS_COMPLETE);
|
||||||
|
map.put("value", Constants.ORDER_STATUS_STR_TAKE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(storeOrder.getIsDel() || storeOrder.getIsSystemDel()){
|
if(storeOrder.getIsDel() || storeOrder.getIsSystemDel()){
|
||||||
|
|||||||
@@ -213,6 +213,26 @@ public class StoreProductReplyServiceImpl extends ServiceImpl<StoreProductReplyD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加虚拟评论
|
||||||
|
* @param request 评论参数
|
||||||
|
* @return 评论结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean virtualCreate(StoreProductReplyAddRequest request) {
|
||||||
|
StoreProductReply storeProductReply = new StoreProductReply();
|
||||||
|
BeanUtils.copyProperties(request, storeProductReply);
|
||||||
|
if(StringUtils.isNotBlank(request.getPics())){
|
||||||
|
String pics = request.getPics()
|
||||||
|
.replace("[","")
|
||||||
|
.replace("]","")
|
||||||
|
.replace("\"","");
|
||||||
|
storeProductReply.setPics(systemAttachmentService.clearPrefix(ArrayUtils.toString(pics)));
|
||||||
|
}
|
||||||
|
storeProductReply.setUnique(CrmebUtil.randomCount(11111,9999)+"");
|
||||||
|
return save(storeProductReply);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单是否已回复
|
* 订单是否已回复
|
||||||
* @param unique 订单id
|
* @param unique 订单id
|
||||||
|
|||||||
@@ -309,10 +309,20 @@ public class StoreProductServiceImpl extends ServiceImpl<StoreProductDao, StoreP
|
|||||||
boolean attrAddResult = attrService.save(singleAttr);
|
boolean attrAddResult = attrService.save(singleAttr);
|
||||||
if (!attrAddResult) throw new CrmebException("新增属性名失败");
|
if (!attrAddResult) throw new CrmebException("新增属性名失败");
|
||||||
StoreProductAttrValue singleAttrValue = new StoreProductAttrValue();
|
StoreProductAttrValue singleAttrValue = new StoreProductAttrValue();
|
||||||
|
BigDecimal commissionL1= BigDecimal.ZERO;
|
||||||
|
BigDecimal commissionL2= BigDecimal.ZERO;
|
||||||
|
if(storeProductRequest.getAttrValue().size()>0){
|
||||||
|
commissionL1 = null != storeProductRequest.getAttrValue().get(0).getBrokerage() ?
|
||||||
|
storeProductRequest.getAttrValue().get(0).getBrokerage():BigDecimal.ZERO;
|
||||||
|
commissionL2 = null != storeProductRequest.getAttrValue().get(0).getBrokerageTwo() ?
|
||||||
|
storeProductRequest.getAttrValue().get(0).getBrokerageTwo():BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
|
||||||
singleAttrValue.setProductId(storeProduct.getId()).setStock(storeProduct.getStock()).setSuk("默认")
|
singleAttrValue.setProductId(storeProduct.getId()).setStock(storeProduct.getStock()).setSuk("默认")
|
||||||
.setSales(storeProduct.getSales()).setPrice(storeProduct.getPrice())
|
.setSales(storeProduct.getSales()).setPrice(storeProduct.getPrice())
|
||||||
.setImage(systemAttachmentService.clearPrefix(storeProduct.getImage()))
|
.setImage(systemAttachmentService.clearPrefix(storeProduct.getImage()))
|
||||||
.setCost(storeProduct.getCost()).setBarCode(storeProduct.getBarCode()).setOtPrice(storeProduct.getOtPrice());
|
.setCost(storeProduct.getCost()).setBarCode(storeProduct.getBarCode())
|
||||||
|
.setOtPrice(storeProduct.getOtPrice()).setBrokerage(commissionL1).setBrokerageTwo(commissionL2);
|
||||||
boolean saveOrUpdateResult = storeProductAttrValueService.save(singleAttrValue);
|
boolean saveOrUpdateResult = storeProductAttrValueService.save(singleAttrValue);
|
||||||
if(!saveOrUpdateResult) throw new CrmebException("新增属性详情失败");
|
if(!saveOrUpdateResult) throw new CrmebException("新增属性详情失败");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ public class OrderUtils {
|
|||||||
status = new OrderAgainItemVo(1,"未发货","商家未发货,请耐心等待");
|
status = new OrderAgainItemVo(1,"未发货","商家未发货,请耐心等待");
|
||||||
}else if(storeOrder.getStatus() == 1){ // 待收货处理
|
}else if(storeOrder.getStatus() == 1){ // 待收货处理
|
||||||
// 待收货
|
// 待收货
|
||||||
if(storeOrder.getDeliveryType().equals(Constants.ORDER_STATUS_STR_SPIKE_KEY)){ // 送货
|
if(null != storeOrder.getDeliveryType() && storeOrder.getDeliveryType().equals(Constants.ORDER_STATUS_STR_SPIKE_KEY)){ // 送货
|
||||||
StoreOrderStatus storeOrderStatus = new StoreOrderStatus();
|
StoreOrderStatus storeOrderStatus = new StoreOrderStatus();
|
||||||
storeOrderStatus.setOid(storeOrder.getId());
|
storeOrderStatus.setOid(storeOrder.getId());
|
||||||
storeOrderStatus.setChangeType(Constants.ORDER_LOG_DELIVERY);
|
storeOrderStatus.setChangeType(Constants.ORDER_LOG_DELIVERY);
|
||||||
@@ -178,7 +178,7 @@ public class OrderUtils {
|
|||||||
String DateStr = DateUtil.dateToStr(sOrderStatusResults.get(sOrderStatusResults.size()-1).getCreateTime(), Constants.DATE_FORMAT);
|
String DateStr = DateUtil.dateToStr(sOrderStatusResults.get(sOrderStatusResults.size()-1).getCreateTime(), Constants.DATE_FORMAT);
|
||||||
status = new OrderAgainItemVo(2,"待收货",DateStr+"服务商已送货");
|
status = new OrderAgainItemVo(2,"待收货",DateStr+"服务商已送货");
|
||||||
}
|
}
|
||||||
}else if(storeOrder.getDeliveryType().equals(Constants.ORDER_LOG_EXPRESS)) {
|
}else if(null != storeOrder.getDeliveryType() && storeOrder.getDeliveryType().equals(Constants.ORDER_LOG_EXPRESS)) {
|
||||||
StoreOrderStatus storeOrderStatus = new StoreOrderStatus();
|
StoreOrderStatus storeOrderStatus = new StoreOrderStatus();
|
||||||
storeOrderStatus.setOid(storeOrder.getId());
|
storeOrderStatus.setOid(storeOrder.getId());
|
||||||
storeOrderStatus.setChangeType(Constants.ORDER_LOG_EXPRESS);
|
storeOrderStatus.setChangeType(Constants.ORDER_LOG_EXPRESS);
|
||||||
|
|||||||
Reference in New Issue
Block a user