yshop1.9.9版本,优化了公众号配置,后台新增订单分类搜索与优化了商品显示等,修复#I19S9R问题

This commit is contained in:
hupeng
2020-02-19 14:42:36 +08:00
parent 5e59cde9ad
commit 9017644082
7 changed files with 57 additions and 7 deletions

View File

@ -91,6 +91,8 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
.eq("status",1).gt("stop_time",OrderUtil.getSecondTimestampTwo());
YxStorePink pink = yxStorePinkMapper.selectOne(wrapper);
if(pink == null) throw new ErrorRequestException("拼团不存在或已经取消");
Map<String, Object> map = getPinkMemberAndPinK(pink);
List<YxStorePink> pinkAll = (List<YxStorePink>)map.get("pinkAll");
YxStorePink pinkT = (YxStorePink)map.get("pinkT");
@ -103,7 +105,10 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
throw new ErrorRequestException("拼团已完成,无法取消");
}
//如果团长取消拼团,团队还有人,就把后面的人作为下一任团长
YxStorePink nextPinkT = pinkAll.get(0);
YxStorePink nextPinkT = null;
if(pinkAll.size() > 0){
nextPinkT = pinkAll.get(0);
}
//先退团长的money
RefundParam param = new RefundParam();

View File

@ -159,7 +159,12 @@ public class WechatController extends BaseController {
String appId = RedisUtil.get("wechat_appid");
if(StrUtil.isBlank(appId)) return "请配置公众号";
WxMpService wxService = WxMpConfiguration.getWxMpService(appId);
final WxMpService wxService = WxMpConfiguration.getWxMpService(appId);
if (wxService == null) {
throw new IllegalArgumentException(String.format("未找到对应appid=[%d]的配置,请核实!", appId));
}
if (wxService.checkSignature(timestamp, nonce, signature)) {
return echostr;
}

View File

@ -83,7 +83,8 @@ public class YxStoreOrderController {
@PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
public ResponseEntity getYxStoreOrders(YxStoreOrderQueryCriteria criteria,
Pageable pageable,
@RequestParam(name = "orderStatus") String orderStatus){
@RequestParam(name = "orderStatus") String orderStatus,
@RequestParam(name = "orderType") String orderType){
if(StrUtil.isNotEmpty(orderStatus)){
@ -133,6 +134,25 @@ public class YxStoreOrderController {
break;
}
}
if(StrUtil.isNotEmpty(orderType)){
switch (orderType){
case "1":
criteria.setBargainId(0);
criteria.setCombinationId(0);
criteria.setSeckillId(0);
break;
case "2":
criteria.setNewCombinationId(0);
break;
case "3":
criteria.setNewSeckillId(0);
break;
case "4":
criteria.setNewBargainId(0);
break;
}
}
return new ResponseEntity(yxStoreOrderService.queryAll(criteria,pageable),HttpStatus.OK);
}

View File

@ -19,7 +19,7 @@ public interface YxStoreOrderService {
Map<String,Object> chartCount();
String orderType(int id, int pinkId, int combinationId, int seckillId);
String orderType(int id, int pinkId, int combinationId, int seckillId,int bargainId);
void refund(YxStoreOrder resources);

View File

@ -33,4 +33,22 @@ public class YxStoreOrderQueryCriteria{
@Query
private Integer isDel;
@Query
private Integer combinationId;
@Query
private Integer seckillId;
@Query
private Integer bargainId;
@Query(propName="combinationId",type = Query.Type.NOT_EQUAL)
private Integer newCombinationId;
@Query(propName="seckillId",type = Query.Type.NOT_EQUAL)
private Integer newSeckillId;
@Query(propName="bargainId",type = Query.Type.NOT_EQUAL)
private Integer newBargainId;
}

View File

@ -197,7 +197,7 @@ public class YxStoreOrderServiceImpl implements YxStoreOrderService {
}
@Override
public String orderType(int id,int pinkId, int combinationId,int seckillId) {
public String orderType(int id,int pinkId, int combinationId,int seckillId,int bargainId) {
String str = "[普通订单]";
if(pinkId > 0 || combinationId > 0){
YxStorePink storePink = storePinkRepository.findByOrderIdKey(id);
@ -222,6 +222,8 @@ public class YxStoreOrderServiceImpl implements YxStoreOrderService {
}else if(seckillId > 0){
str = "[秒杀订单]";
}else if(bargainId > 0){
str = "[砍价订单]";
}
return str;
}
@ -263,7 +265,7 @@ public class YxStoreOrderServiceImpl implements YxStoreOrderService {
yxStoreOrderDTO.setPinkName(orderType(yxStoreOrder.getId()
,yxStoreOrder.getPinkId(),yxStoreOrder.getCombinationId()
,yxStoreOrder.getSeckillId()));
,yxStoreOrder.getSeckillId(),yxStoreOrder.getBargainId()));
List<StoreOrderCartInfo> cartInfos = yxStoreOrderCartInfoRepository
.findByOid(yxStoreOrder.getId());

View File

@ -55,7 +55,7 @@ public class YxSystemConfigController {
yxSystemConfigModel.setValue(value.toString());
//重新配置微信相关
if(key.equals("wechat_appid")){
WxMpConfiguration.removeWxMpService(key);
WxMpConfiguration.removeWxMpService(value.toString());
}
RedisUtil.set(key,value.toString(),0);
if(ObjectUtil.isNull(yxSystemConfig)){