yshop1.9.9版本,优化了公众号配置,后台新增订单分类搜索与优化了商品显示等,修复#I19S9R问题
This commit is contained in:
@ -91,6 +91,8 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
|
|||||||
.eq("status",1).gt("stop_time",OrderUtil.getSecondTimestampTwo());
|
.eq("status",1).gt("stop_time",OrderUtil.getSecondTimestampTwo());
|
||||||
YxStorePink pink = yxStorePinkMapper.selectOne(wrapper);
|
YxStorePink pink = yxStorePinkMapper.selectOne(wrapper);
|
||||||
|
|
||||||
|
if(pink == null) throw new ErrorRequestException("拼团不存在或已经取消");
|
||||||
|
|
||||||
Map<String, Object> map = getPinkMemberAndPinK(pink);
|
Map<String, Object> map = getPinkMemberAndPinK(pink);
|
||||||
List<YxStorePink> pinkAll = (List<YxStorePink>)map.get("pinkAll");
|
List<YxStorePink> pinkAll = (List<YxStorePink>)map.get("pinkAll");
|
||||||
YxStorePink pinkT = (YxStorePink)map.get("pinkT");
|
YxStorePink pinkT = (YxStorePink)map.get("pinkT");
|
||||||
@ -103,7 +105,10 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl<YxStorePinkMapper, Y
|
|||||||
throw new ErrorRequestException("拼团已完成,无法取消");
|
throw new ErrorRequestException("拼团已完成,无法取消");
|
||||||
}
|
}
|
||||||
//如果团长取消拼团,团队还有人,就把后面的人作为下一任团长
|
//如果团长取消拼团,团队还有人,就把后面的人作为下一任团长
|
||||||
YxStorePink nextPinkT = pinkAll.get(0);
|
YxStorePink nextPinkT = null;
|
||||||
|
if(pinkAll.size() > 0){
|
||||||
|
nextPinkT = pinkAll.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
//先退团长的money
|
//先退团长的money
|
||||||
RefundParam param = new RefundParam();
|
RefundParam param = new RefundParam();
|
||||||
|
@ -159,7 +159,12 @@ public class WechatController extends BaseController {
|
|||||||
|
|
||||||
String appId = RedisUtil.get("wechat_appid");
|
String appId = RedisUtil.get("wechat_appid");
|
||||||
if(StrUtil.isBlank(appId)) return "请配置公众号";
|
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)) {
|
if (wxService.checkSignature(timestamp, nonce, signature)) {
|
||||||
return echostr;
|
return echostr;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,8 @@ public class YxStoreOrderController {
|
|||||||
@PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
|
@PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
|
||||||
public ResponseEntity getYxStoreOrders(YxStoreOrderQueryCriteria criteria,
|
public ResponseEntity getYxStoreOrders(YxStoreOrderQueryCriteria criteria,
|
||||||
Pageable pageable,
|
Pageable pageable,
|
||||||
@RequestParam(name = "orderStatus") String orderStatus){
|
@RequestParam(name = "orderStatus") String orderStatus,
|
||||||
|
@RequestParam(name = "orderType") String orderType){
|
||||||
|
|
||||||
|
|
||||||
if(StrUtil.isNotEmpty(orderStatus)){
|
if(StrUtil.isNotEmpty(orderStatus)){
|
||||||
@ -133,6 +134,25 @@ public class YxStoreOrderController {
|
|||||||
break;
|
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);
|
return new ResponseEntity(yxStoreOrderService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ public interface YxStoreOrderService {
|
|||||||
|
|
||||||
Map<String,Object> chartCount();
|
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);
|
void refund(YxStoreOrder resources);
|
||||||
|
|
||||||
|
@ -33,4 +33,22 @@ public class YxStoreOrderQueryCriteria{
|
|||||||
|
|
||||||
@Query
|
@Query
|
||||||
private Integer isDel;
|
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;
|
||||||
}
|
}
|
@ -197,7 +197,7 @@ public class YxStoreOrderServiceImpl implements YxStoreOrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 = "[普通订单]";
|
String str = "[普通订单]";
|
||||||
if(pinkId > 0 || combinationId > 0){
|
if(pinkId > 0 || combinationId > 0){
|
||||||
YxStorePink storePink = storePinkRepository.findByOrderIdKey(id);
|
YxStorePink storePink = storePinkRepository.findByOrderIdKey(id);
|
||||||
@ -222,6 +222,8 @@ public class YxStoreOrderServiceImpl implements YxStoreOrderService {
|
|||||||
|
|
||||||
}else if(seckillId > 0){
|
}else if(seckillId > 0){
|
||||||
str = "[秒杀订单]";
|
str = "[秒杀订单]";
|
||||||
|
}else if(bargainId > 0){
|
||||||
|
str = "[砍价订单]";
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@ -263,7 +265,7 @@ public class YxStoreOrderServiceImpl implements YxStoreOrderService {
|
|||||||
|
|
||||||
yxStoreOrderDTO.setPinkName(orderType(yxStoreOrder.getId()
|
yxStoreOrderDTO.setPinkName(orderType(yxStoreOrder.getId()
|
||||||
,yxStoreOrder.getPinkId(),yxStoreOrder.getCombinationId()
|
,yxStoreOrder.getPinkId(),yxStoreOrder.getCombinationId()
|
||||||
,yxStoreOrder.getSeckillId()));
|
,yxStoreOrder.getSeckillId(),yxStoreOrder.getBargainId()));
|
||||||
|
|
||||||
List<StoreOrderCartInfo> cartInfos = yxStoreOrderCartInfoRepository
|
List<StoreOrderCartInfo> cartInfos = yxStoreOrderCartInfoRepository
|
||||||
.findByOid(yxStoreOrder.getId());
|
.findByOid(yxStoreOrder.getId());
|
||||||
|
@ -55,7 +55,7 @@ public class YxSystemConfigController {
|
|||||||
yxSystemConfigModel.setValue(value.toString());
|
yxSystemConfigModel.setValue(value.toString());
|
||||||
//重新配置微信相关
|
//重新配置微信相关
|
||||||
if(key.equals("wechat_appid")){
|
if(key.equals("wechat_appid")){
|
||||||
WxMpConfiguration.removeWxMpService(key);
|
WxMpConfiguration.removeWxMpService(value.toString());
|
||||||
}
|
}
|
||||||
RedisUtil.set(key,value.toString(),0);
|
RedisUtil.set(key,value.toString(),0);
|
||||||
if(ObjectUtil.isNull(yxSystemConfig)){
|
if(ObjectUtil.isNull(yxSystemConfig)){
|
||||||
|
Reference in New Issue
Block a user