Browse Source

优化流程

zyj
sj 2 years ago
parent
commit
b0a0785501
  1. BIN
      poster.jpg
  2. BIN
      simsunb.ttf
  3. 2
      yudao-server/src/main/resources/application-local.yaml
  4. 5
      zsw-bxg/pom.xml
  5. 18
      zsw-bxg/src/main/java/co/yixiang/app/modules/banner/Banner.java
  6. 16
      zsw-bxg/src/main/java/co/yixiang/app/modules/entry/rest/AppStoreEntryController.java
  7. 3
      zsw-bxg/src/main/java/co/yixiang/app/modules/evaluation/rest/AppStoreEvaluationController.java
  8. 7
      zsw-bxg/src/main/java/co/yixiang/app/modules/order/rest/AppStoreOrderController.java
  9. 50
      zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/LetterAppUserController.java
  10. 10
      zsw-bxg/src/main/java/co/yixiang/constant/ShopConstants.java
  11. 1
      zsw-bxg/src/main/java/co/yixiang/constant/SystemConfigConstants.java
  12. 2
      zsw-bxg/src/main/java/co/yixiang/enums/OrderInfoEnum.java
  13. 1
      zsw-bxg/src/main/java/co/yixiang/enums/OrderStatusEnum.java
  14. 4
      zsw-bxg/src/main/java/co/yixiang/modules/cart/domain/YxStoreBrandCart.java
  15. 24
      zsw-bxg/src/main/java/co/yixiang/modules/cart/service/impl/YxStoreCartServiceImpl.java
  16. 2
      zsw-bxg/src/main/java/co/yixiang/modules/entry/service/YxStoreEntryService.java
  17. 19
      zsw-bxg/src/main/java/co/yixiang/modules/entry/service/impl/YxStoreEntryServiceImpl.java
  18. 6
      zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/YxEvaluationRelationService.java
  19. 6
      zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/YxEvaluationService.java
  20. 7
      zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/impl/YxEvaluationRelationServiceImpl.java
  21. 26
      zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/impl/YxEvaluationServiceImpl.java
  22. 11
      zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/mapper/YxEvaluationRelationMapper.java
  23. 2
      zsw-bxg/src/main/java/co/yixiang/modules/evaluation/vo/YxStoreEvaluationRelationQueryVo.java
  24. 3
      zsw-bxg/src/main/java/co/yixiang/modules/inform/service/SendMsgService.java
  25. 29
      zsw-bxg/src/main/java/co/yixiang/modules/inform/service/impl/SendMsgServiceImpl.java
  26. 8
      zsw-bxg/src/main/java/co/yixiang/modules/order/domain/YxStoreOrder.java
  27. 44
      zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java
  28. 6
      zsw-bxg/src/main/java/co/yixiang/modules/user/rest/MemberController.java
  29. 2
      zsw-bxg/src/main/java/co/yixiang/utils/EvaluationDTO.java

BIN
poster.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
simsunb.ttf

Binary file not shown.

2
yudao-server/src/main/resources/application-local.yaml

@ -244,7 +244,7 @@ dubbo:
bxg: bxg:
shop: shop:
# API_URL: http://192.168.10.113:48080/bxgApp # API_URL: http://192.168.10.113:48080/bxgApp
API_URL: https://8d9e-27-19-79-216.jp.ngrok.io API_URL: https://5361-27-19-79-51.jp.ngrok.io
SITE_URL: http://192.168.10.113:48080/bxgApp SITE_URL: http://192.168.10.113:48080/bxgApp
UNI_SITE_URL: http://192.168.10.113:48080/bxgApp UNI_SITE_URL: http://192.168.10.113:48080/bxgApp
ADMIN_API_URL: http://192.168.10.113:48080/bxg ADMIN_API_URL: http://192.168.10.113:48080/bxg

5
zsw-bxg/pom.xml

@ -164,6 +164,11 @@
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.50</version> <version>1.2.50</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.12</version>
</dependency>
</dependencies> </dependencies>

18
zsw-bxg/src/main/java/co/yixiang/app/modules/banner/Banner.java

@ -0,0 +1,18 @@
package co.yixiang.app.modules.banner;
import lombok.Data;
@Data
public class Banner {
//首页标题
private String name;
//id
private String id;
//排序
private String sort;
//url链接
private String url;
//type
private Integer type;
}

16
zsw-bxg/src/main/java/co/yixiang/app/modules/entry/rest/AppStoreEntryController.java

@ -36,11 +36,23 @@ public class AppStoreEntryController {
* 查询词条讲解 * 查询词条讲解
*/ */
@AnonymousAccess @AnonymousAccess
@GetMapping("/entry{id}") @GetMapping("/entry/{id}")
@ApiOperation(value = "词条查询",notes = "词条") @ApiOperation(value = "词条id查询词条",notes = "词条")
public ApiResult<EntryDTO> getYxEntry(@PathVariable int id){ public ApiResult<EntryDTO> getYxEntry(@PathVariable int id){
EntryDTO entryDTO=yxStoreEntryService.getEntry(id); EntryDTO entryDTO=yxStoreEntryService.getEntry(id);
return ApiResult.ok(entryDTO); return ApiResult.ok(entryDTO);
} }
/**
* 查询词条讲解
*/
@AnonymousAccess
@GetMapping("/entryByName")
@ApiOperation(value = "根据词条名查询词条",notes = "词条")
public ApiResult<EntryDTO> getEntryByName(String name){
EntryDTO entryDTO=yxStoreEntryService.getEntryByName(name);
return ApiResult.ok(entryDTO);
}
} }

3
zsw-bxg/src/main/java/co/yixiang/app/modules/evaluation/rest/AppStoreEvaluationController.java

@ -66,7 +66,8 @@ public class AppStoreEvaluationController {
@GetMapping("/evaluation/{id}") @GetMapping("/evaluation/{id}")
@ApiOperation(value = "评测查询",notes = "产品评测") @ApiOperation(value = "评测查询",notes = "产品评测")
public ApiResult<EvaluationDTO> getYxEvaluation(@PathVariable int id){ public ApiResult<EvaluationDTO> getYxEvaluation(@PathVariable int id){
EvaluationDTO evaluationDTO=yxEvaluationService.getEvaluationById(id); long uid = LocalUser.getUidByToken();
EvaluationDTO evaluationDTO=yxEvaluationService.getEvaluationById(uid,id);
return ApiResult.ok(evaluationDTO); return ApiResult.ok(evaluationDTO);
} }

7
zsw-bxg/src/main/java/co/yixiang/app/modules/order/rest/AppStoreOrderController.java

@ -222,10 +222,6 @@ public class AppStoreOrderController {
orderSupplyService.goPay(map, orderId, uid, param.getPaytype(), param.getFrom(), orderDTO); orderSupplyService.goPay(map, orderId, uid, param.getPaytype(), param.getFrom(), orderDTO);
//这里判断是否支付成功
if (map!=null){
sendMsgService.inform(Long.valueOf(orderId));
}
return ApiResult.ok(map); return ApiResult.ok(map);
} }
@ -237,7 +233,7 @@ public class AppStoreOrderController {
@AuthCheck @AuthCheck
@GetMapping("/order/list") @GetMapping("/order/list")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "商品状态,-1全部 默认为0未支付 1待发货 2待收货 3待评价 4已完成 5退款中 6已退款 7退款", @ApiImplicitParam(name = "type", value = "商品状态,-1全部 默认为0未支付 1待发货 2待收货 3待评价 4已完成 5退款中 6已退款 7退款 8已取消",
paramType = "query", dataType = "int",dataTypeClass = Integer.class), paramType = "query", dataType = "int",dataTypeClass = Integer.class),
@ApiImplicitParam(name = "page", value = "页码,默认为1", paramType = "query", dataType = "int",dataTypeClass = Integer.class), @ApiImplicitParam(name = "page", value = "页码,默认为1", paramType = "query", dataType = "int",dataTypeClass = Integer.class),
@ApiImplicitParam(name = "limit", value = "页大小,默认为10", paramType = "query", dataType = "int",dataTypeClass = Integer.class) @ApiImplicitParam(name = "limit", value = "页大小,默认为10", paramType = "query", dataType = "int",dataTypeClass = Integer.class)
@ -382,7 +378,6 @@ public class AppStoreOrderController {
list.add("收到商品损坏了"); list.add("收到商品损坏了");
list.add("未按预定时间发货"); list.add("未按预定时间发货");
list.add("其它原因"); list.add("其它原因");
return ApiResult.ok(list); return ApiResult.ok(list);
} }

50
zsw-bxg/src/main/java/co/yixiang/app/modules/user/rest/LetterAppUserController.java

@ -18,7 +18,7 @@ import co.yixiang.logging.aop.log.AppLog;
import co.yixiang.constant.ShopConstants; import co.yixiang.constant.ShopConstants;
import co.yixiang.enums.BillInfoEnum; import co.yixiang.enums.BillInfoEnum;
import co.yixiang.modules.evaluation.service.YxEvaluationRelationService; import co.yixiang.modules.evaluation.service.YxEvaluationRelationService;
import co.yixiang.modules.evaluation.service.vo.YxStoreEvaluationRelationQueryVo; import co.yixiang.modules.evaluation.vo.YxStoreEvaluationRelationQueryVo;
import co.yixiang.modules.order.service.YxStoreOrderService; import co.yixiang.modules.order.service.YxStoreOrderService;
import co.yixiang.modules.order.vo.UserOrderCountVo; import co.yixiang.modules.order.vo.UserOrderCountVo;
import co.yixiang.modules.product.service.YxStoreProductRelationService; import co.yixiang.modules.product.service.YxStoreProductRelationService;
@ -31,6 +31,7 @@ import co.yixiang.modules.user.service.YxUserService;
import co.yixiang.modules.user.service.YxUserSignService; import co.yixiang.modules.user.service.YxUserSignService;
import co.yixiang.modules.user.vo.SignVo; import co.yixiang.modules.user.vo.SignVo;
import co.yixiang.modules.user.vo.YxUserQueryVo; import co.yixiang.modules.user.vo.YxUserQueryVo;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
@ -40,12 +41,9 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -98,7 +96,47 @@ public class LetterAppUserController {
return ApiResult.ok(map); return ApiResult.ok(map);
} }
/**
* 获取各类轮播图
*/
@GetMapping("/menu/banner/{type}")
@ApiOperation(value = "获取各种轮播图(0:首页 1:品牌馆 2:优惠券 3:活动专区)",notes = "获取轮播图")
public ApiResult<Map<String,Object>> bannerMenu(@PathVariable Integer type){
Map<String,Object> map = new LinkedHashMap<>();
// map.put("banner",systemGroupDataService.getDatas(ShopConstants.ZSW_HOME_BANNER));
List<JSONObject> list=systemGroupDataService.getDatas(ShopConstants.ZSW_HOME_BANNER);
ArrayList bannerList=new ArrayList<>();
list.forEach(item->{
if(item.get("type")==type){
bannerList.add(item);
}
});
map.put("banner",bannerList);
return ApiResult.ok(map);
}
/**
* 获取常见问答
*/
@GetMapping("/menu/problem")
@ApiOperation(value = "获取常见问答",notes = "获取常见问答")
public ApiResult<Map<String,Object>> problem(){
Map<String,Object> map = new LinkedHashMap<>();
map.put("routine_problem",systemGroupDataService.getDatas(ShopConstants.ZSW_HOME_PROBLEM));
return ApiResult.ok(map);
}
/**
* 获取关于我们
*/
@GetMapping("/menu/aboutUs")
@ApiOperation(value = "获取关于我们",notes = "获取关于我们")
public ApiResult<Map<String,Object>> aboutUs(){
Map<String,Object> map = new LinkedHashMap<>();
map.put("routine_aboutUs",systemConfigService.getData(ShopConstants.ZSW_HOME_ABOUTUS));
return ApiResult.ok(map);
}
/** /**
* 订单统计数据 * 订单统计数据

10
zsw-bxg/src/main/java/co/yixiang/constant/ShopConstants.java

@ -91,6 +91,16 @@ public interface ShopConstants {
* 首页banner * 首页banner
*/ */
String ZSW_HOME_BANNER = "zsw_home_banner"; String ZSW_HOME_BANNER = "zsw_home_banner";
/**
* 常见问答
*/
String ZSW_HOME_PROBLEM = "zsw_home_problem";
/**
* 关于我们
*/
String ZSW_HOME_ABOUTUS = "aboutUS";
/** /**
* 首页菜单 * 首页菜单
*/ */

1
zsw-bxg/src/main/java/co/yixiang/constant/SystemConfigConstants.java

@ -1,6 +1,7 @@
package co.yixiang.constant; package co.yixiang.constant;
public class SystemConfigConstants { public class SystemConfigConstants {
public final static String ROBOT_URL="robotUrl";
//地址配置 //地址配置
public final static String API="api"; public final static String API="api";
public final static String API_URL="api_url"; public final static String API_URL="api_url";

2
zsw-bxg/src/main/java/co/yixiang/enums/OrderInfoEnum.java

@ -24,7 +24,7 @@ public enum OrderInfoEnum {
STATUS_1(1,"待收货"), STATUS_1(1,"待收货"),
STATUS_2(2,"已收货"), STATUS_2(2,"已收货"),
STATUS_3(3,"已完成"), STATUS_3(3,"已完成"),
STATUS_8(3,"已取消"),
PAY_STATUS_0(0,"未支付"), PAY_STATUS_0(0,"未支付"),
PAY_STATUS_1(1,"已支付"), PAY_STATUS_1(1,"已支付"),

1
zsw-bxg/src/main/java/co/yixiang/enums/OrderStatusEnum.java

@ -24,6 +24,7 @@ public enum OrderStatusEnum {
STATUS_2(2,"待收货"), STATUS_2(2,"待收货"),
STATUS_3(3,"待评价"), STATUS_3(3,"待评价"),
STATUS_4(4,"已完成"), STATUS_4(4,"已完成"),
STATUS_8(8,"已取消"),
STATUS_MINUS_1(-1,"退款中"), STATUS_MINUS_1(-1,"退款中"),
STATUS_MINUS_2(-2,"已退款"), STATUS_MINUS_2(-2,"已退款"),
STATUS_MINUS_3(-3,"退款"); STATUS_MINUS_3(-3,"退款");

4
zsw-bxg/src/main/java/co/yixiang/modules/cart/domain/YxStoreBrandCart.java

@ -12,6 +12,6 @@ public class YxStoreBrandCart{
private Map<String, Object> brand; private Map<String, Object> brand;
//购物车品牌下的有效的商品列表 //购物车品牌下的有效的商品列表
private List<YxStoreCartQueryVo> validProductList; private List<YxStoreCartQueryVo> validProductList;
//购物车品牌下的有效的商品列表 // //购物车品牌下的无效的商品列表
private List<YxStoreCartQueryVo> invalidProductList; // private List<YxStoreCartQueryVo> invalidProductList;
} }

24
zsw-bxg/src/main/java/co/yixiang/modules/cart/service/impl/YxStoreCartServiceImpl.java

@ -42,6 +42,7 @@ import co.yixiang.modules.store.service.mapper.YxStoreBrandMapper;
import co.yixiang.modules.user.service.YxUserService; import co.yixiang.modules.user.service.YxUserService;
import co.yixiang.utils.FileUtil; import co.yixiang.utils.FileUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -168,7 +169,7 @@ public class YxStoreCartServiceImpl extends BaseServiceImpl<StoreCartMapper, YxS
List<YxStoreCart> carts = yxStoreCartMapper.selectList(wrapper); List<YxStoreCart> carts = yxStoreCartMapper.selectList(wrapper);
List<YxStoreCartQueryVo> valid = new ArrayList<>(); List<YxStoreCartQueryVo> valid = new ArrayList<>();
List<YxStoreCartQueryVo> invalid = new ArrayList<>(); ArrayList<YxStoreCartQueryVo> invalid = new ArrayList<>();
for (YxStoreCart storeCart : carts) { for (YxStoreCart storeCart : carts) {
YxStoreProductQueryVo storeProduct = null; YxStoreProductQueryVo storeProduct = null;
@ -257,16 +258,10 @@ public class YxStoreCartServiceImpl extends BaseServiceImpl<StoreCartMapper, YxS
ArrayList cartList=new ArrayList<>(); ArrayList cartList=new ArrayList<>();
//获取不重复的品牌id数组 //获取不重复的品牌id数组
LinkedHashSet<String> BrandIdList = new LinkedHashSet<>(); LinkedHashSet<String> BrandIdList = new LinkedHashSet<>();
//有效商品
valid.forEach(item->{ valid.forEach(item->{
YxStoreProduct storeProduct = storeProductMapper.selectById(item.getProductId()); YxStoreProduct storeProduct = storeProductMapper.selectById(item.getProductId());
BrandIdList.add(storeProduct.getBrandId()); BrandIdList.add(storeProduct.getBrandId());
}); });
//无效商品
invalid.forEach(item->{
YxStoreProduct storeProduct = storeProductMapper.selectById(item.getProductId());
BrandIdList.add(storeProduct.getBrandId());
});
BrandIdList.forEach(item->{ BrandIdList.forEach(item->{
YxStoreBrand yxStoreBrand=yxStoreBrandMapper.selectById(item); YxStoreBrand yxStoreBrand=yxStoreBrandMapper.selectById(item);
Map<String, Object> list = new LinkedHashMap<>(); Map<String, Object> list = new LinkedHashMap<>();
@ -274,9 +269,8 @@ public class YxStoreCartServiceImpl extends BaseServiceImpl<StoreCartMapper, YxS
list.put("brandName",yxStoreBrand.getBrandName()); list.put("brandName",yxStoreBrand.getBrandName());
list.put("pic",yxStoreBrand.getPic()); list.put("pic",yxStoreBrand.getPic());
yxStoreBrandCart.setBrand(list); yxStoreBrandCart.setBrand(list);
//对valid/invalid进行筛选,只要当前品牌下的商品 //对valid按品牌进行区分
List<YxStoreCartQueryVo> validProductList = new ArrayList<>(); List<YxStoreCartQueryVo> validProductList = new ArrayList<>();
List<YxStoreCartQueryVo> invalidProductList = new ArrayList<>();
valid.forEach(item1->{ valid.forEach(item1->{
YxStoreProduct yxStoreProduct= storeProductMapper.selectById(item1.getProductId());; YxStoreProduct yxStoreProduct= storeProductMapper.selectById(item1.getProductId());;
// //商品品牌id相等 // //商品品牌id相等
@ -284,20 +278,12 @@ public class YxStoreCartServiceImpl extends BaseServiceImpl<StoreCartMapper, YxS
validProductList.add(item1); validProductList.add(item1);
} }
}); });
invalid.forEach(item1->{
YxStoreProduct yxStoreProduct= storeProductMapper.selectById(item1.getProductId());;
//商品品牌id相等
if (item.equals(yxStoreProduct.getBrandId())){
invalidProductList.add(item1);
}
});
yxStoreBrandCart.setValidProductList(validProductList); yxStoreBrandCart.setValidProductList(validProductList);
yxStoreBrandCart.setInvalidProductList(invalidProductList);
cartList.add(yxStoreBrandCart); cartList.add(yxStoreBrandCart);
}); });
// map.put("valid", valid); //将所有品牌的失效商品筛选出来
// map.put("invalid", invalid);
map.put("cartList",cartList); map.put("cartList",cartList);
map.put("invalidProductList",invalid);
return map; return map;
} }

2
zsw-bxg/src/main/java/co/yixiang/modules/entry/service/YxStoreEntryService.java

@ -50,4 +50,6 @@ public interface YxStoreEntryService extends BaseService<YxStoreEntry> {
void download(List<YxStoreEntryDto> all, HttpServletResponse response) throws IOException; void download(List<YxStoreEntryDto> all, HttpServletResponse response) throws IOException;
EntryDTO getEntry(int id); EntryDTO getEntry(int id);
EntryDTO getEntryByName(String name);
} }

19
zsw-bxg/src/main/java/co/yixiang/modules/entry/service/impl/YxStoreEntryServiceImpl.java

@ -8,6 +8,7 @@
*/ */
package co.yixiang.modules.entry.service.impl; package co.yixiang.modules.entry.service.impl;
import cn.iocoder.yudao.framework.common.exception.YshopException;
import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.service.impl.BaseServiceImpl;
import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.common.utils.QueryHelpPlus;
import co.yixiang.domain.PageResult; import co.yixiang.domain.PageResult;
@ -99,5 +100,23 @@ public class YxStoreEntryServiceImpl extends BaseServiceImpl<YxStoreEntryMapper,
return entryDTO; return entryDTO;
} }
@Override
@ApiImplicitParams({
@ApiImplicitParam(name = "name", value = "名字", paramType = "query", dataType = "string",dataTypeClass = String.class)
})
public EntryDTO getEntryByName(String name) {
LambdaQueryWrapper<YxStoreEntry> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(YxStoreEntry::getIsDel, CommonEnum.DEL_STATUS_0.getValue()).eq(YxStoreEntry::getEntryName,name);
YxStoreEntry yxStoreEntry=yxStoreEntryMapper.selectOne(wrapper);
if (yxStoreEntry==null){
throw new YshopException("没有这个词条");
}
EntryDTO entryDTO=new EntryDTO();
//取出需要的属性
entryDTO.setEntryName(yxStoreEntry.getEntryName());
entryDTO.setEntryInfo(yxStoreEntry.getEntryInfo());
return entryDTO;
}
} }

6
zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/YxEvaluationRelationService.java

@ -1,13 +1,13 @@
package co.yixiang.modules.evaluation.service; package co.yixiang.modules.evaluation.service;
import co.yixiang.common.service.BaseService;
import co.yixiang.domain.PageResult; import co.yixiang.domain.PageResult;
import co.yixiang.modules.evaluation.domain.YxStoreEvaluationRelation; import co.yixiang.modules.evaluation.domain.YxStoreEvaluationRelation;
import co.yixiang.modules.evaluation.service.dto.YxStoreEvaluationRelationDto; import co.yixiang.modules.evaluation.service.dto.YxStoreEvaluationRelationDto;
import co.yixiang.modules.evaluation.service.vo.YxStoreEvaluationRelationQueryVo; import co.yixiang.modules.evaluation.vo.YxStoreEvaluationRelationQueryVo;
import co.yixiang.modules.product.service.dto.YxStoreProductRelationQueryCriteria; import co.yixiang.modules.product.service.dto.YxStoreProductRelationQueryCriteria;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import java.util.List; import java.util.List;
/** /**
@ -18,7 +18,7 @@ import java.util.List;
* @author hupeng * @author hupeng
* @since 2019-10-23 * @since 2019-10-23
*/ */
public interface YxEvaluationRelationService { public interface YxEvaluationRelationService extends BaseService<YxStoreEvaluationRelation> {
/** /**
* 是否收藏 * 是否收藏
* @param evaluationId 评测ID * @param evaluationId 评测ID

6
zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/YxEvaluationService.java

@ -50,16 +50,16 @@ public interface YxEvaluationService extends BaseService<YxEvaluation> {
void download(List<YxEvaluationDto> all, HttpServletResponse response) throws IOException; void download(List<YxEvaluationDto> all, HttpServletResponse response) throws IOException;
/*** /***
* app首页获取评测列表 * 后台首页获取评测列表
*/ */
List<EvaluationDTO> getList(); List<EvaluationDTO> getList();
/** /**
* 后台获取评测列表 * 小程序首页获取评测列表
* @return * @return
*/ */
List<YxEvaluationQueryVo> getList(int page, int limit); List<YxEvaluationQueryVo> getList(int page, int limit);
EvaluationDTO getEvaluationById(int id); EvaluationDTO getEvaluationById(Long uid,int id);
} }

7
zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/impl/YxEvaluationRelationServiceImpl.java

@ -11,7 +11,7 @@ import co.yixiang.modules.evaluation.service.YxEvaluationRelationService;
import co.yixiang.modules.evaluation.service.YxEvaluationService; import co.yixiang.modules.evaluation.service.YxEvaluationService;
import co.yixiang.modules.evaluation.service.dto.YxStoreEvaluationRelationDto; import co.yixiang.modules.evaluation.service.dto.YxStoreEvaluationRelationDto;
import co.yixiang.modules.evaluation.service.mapper.YxEvaluationRelationMapper; import co.yixiang.modules.evaluation.service.mapper.YxEvaluationRelationMapper;
import co.yixiang.modules.evaluation.service.vo.YxStoreEvaluationRelationQueryVo; import co.yixiang.modules.evaluation.vo.YxStoreEvaluationRelationQueryVo;
import co.yixiang.modules.product.service.dto.YxStoreProductRelationQueryCriteria; import co.yixiang.modules.product.service.dto.YxStoreProductRelationQueryCriteria;
import co.yixiang.modules.user.service.YxUserService; import co.yixiang.modules.user.service.YxUserService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -56,7 +56,7 @@ public class YxEvaluationRelationServiceImpl extends BaseServiceImpl<YxEvaluatio
Long count = yxEvaluationRelationMapper Long count = yxEvaluationRelationMapper
.selectCount(Wrappers.<YxStoreEvaluationRelation>lambdaQuery() .selectCount(Wrappers.<YxStoreEvaluationRelation>lambdaQuery()
.eq(YxStoreEvaluationRelation::getUid,uid) .eq(YxStoreEvaluationRelation::getUid,uid)
.eq(YxStoreEvaluationRelation::getType,"collect") .eq(YxStoreEvaluationRelation::getIsDel,0)
.eq(YxStoreEvaluationRelation::getEvaluationId,evaluationId)); .eq(YxStoreEvaluationRelation::getEvaluationId,evaluationId));
if(count > 0) { if(count > 0) {
return true; return true;
@ -96,6 +96,7 @@ public class YxEvaluationRelationServiceImpl extends BaseServiceImpl<YxEvaluatio
if (evaluationRelation == null){ if (evaluationRelation == null){
throw new YshopException("已取消"); throw new YshopException("已取消");
} }
this.removeById(evaluationRelation.getId());
} }
/** /**
@ -108,7 +109,7 @@ public class YxEvaluationRelationServiceImpl extends BaseServiceImpl<YxEvaluatio
@Override @Override
public List<YxStoreEvaluationRelationQueryVo> userCollectEvaluation(int page, int limit, Long uid, String type) { public List<YxStoreEvaluationRelationQueryVo> userCollectEvaluation(int page, int limit, Long uid, String type) {
Page<YxStoreEvaluationRelation> pageModel = new Page<>(page, limit); Page<YxStoreEvaluationRelation> pageModel = new Page<>(page, limit);
List<YxStoreEvaluationRelationQueryVo> list = yxEvaluationRelationMapper.selectRelationList(pageModel,uid,type); List<YxStoreEvaluationRelationQueryVo> list = yxEvaluationRelationMapper.selectRelationList(pageModel,uid);
return list; return list;
} }

26
zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/impl/YxEvaluationServiceImpl.java

@ -19,6 +19,7 @@ import co.yixiang.enums.ShopCommonEnum;
import co.yixiang.exception.ErrorRequestException; import co.yixiang.exception.ErrorRequestException;
import co.yixiang.modules.entry.domain.YxStoreEntry; import co.yixiang.modules.entry.domain.YxStoreEntry;
import co.yixiang.modules.evaluation.domain.YxEvaluation; import co.yixiang.modules.evaluation.domain.YxEvaluation;
import co.yixiang.modules.evaluation.service.YxEvaluationRelationService;
import co.yixiang.modules.evaluation.service.YxEvaluationService; import co.yixiang.modules.evaluation.service.YxEvaluationService;
import co.yixiang.modules.evaluation.service.dto.YxEvaluationDto; import co.yixiang.modules.evaluation.service.dto.YxEvaluationDto;
import co.yixiang.modules.evaluation.service.dto.YxEvaluationQueryCriteria; import co.yixiang.modules.evaluation.service.dto.YxEvaluationQueryCriteria;
@ -50,19 +51,23 @@ import java.io.IOException;
import java.util.*; import java.util.*;
/** /**
* @author hupeng * @author sj
* @date 2022-09-21 * @date 2022-10-21
*/ */
@Service @Service
@AllArgsConstructor @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
//@CacheConfig(cacheNames = "yxEvaluation")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class YxEvaluationServiceImpl extends BaseServiceImpl<YxEvaluationMapper, YxEvaluation> implements YxEvaluationService { public class YxEvaluationServiceImpl extends BaseServiceImpl<YxEvaluationMapper, YxEvaluation> implements YxEvaluationService {
private final IGenerator generator; @Autowired
private IGenerator generator;
@Autowired
private YxEvaluationMapper yxEvaluationMapper; private YxEvaluationMapper yxEvaluationMapper;
@Autowired
private StoreProductMapper storeProductMapper; private StoreProductMapper storeProductMapper;
private final YxStoreProductService yxStoreProductService; @Autowired
private YxStoreProductService yxStoreProductService;
@Autowired
private YxEvaluationRelationService yxEvaluationRelationService;
@Override @Override
//@Cacheable //@Cacheable
@ -154,19 +159,24 @@ public class YxEvaluationServiceImpl extends BaseServiceImpl<YxEvaluationMapper,
/** /**
* app查询评测 * app查询评测
* @param id 商品id
* @param uid 用户id
* @return List * @return List
*/ */
@Override @Override
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "词条ID", paramType = "query", dataType = "int",dataTypeClass = Integer.class) @ApiImplicitParam(name = "id", value = "词条ID", paramType = "query", dataType = "int",dataTypeClass = Integer.class)
}) })
public EvaluationDTO getEvaluationById(int id) { public EvaluationDTO getEvaluationById(Long uid,int id) {
EvaluationDTO evaluationDTO=generator.convert(this.baseMapper.selectById(id), EvaluationDTO.class); EvaluationDTO evaluationDTO=generator.convert(this.baseMapper.selectById(id), EvaluationDTO.class);
YxStoreProduct yxStoreProduct = yxStoreProductService.getProductInfo(Long.valueOf(evaluationDTO.getProduct())); YxStoreProduct yxStoreProduct = yxStoreProductService.getProductInfo(Long.valueOf(evaluationDTO.getProduct()));
evaluationDTO.setProductInfo(yxStoreProduct); evaluationDTO.setProductInfo(yxStoreProduct);
evaluationDTO.setAccessibilityImageArr(Arrays.asList(evaluationDTO.getAccessibilityImage().split(","))); evaluationDTO.setAccessibilityImageArr(Arrays.asList(evaluationDTO.getAccessibilityImage().split(",")));
evaluationDTO.setDisplayImageArr(Arrays.asList(evaluationDTO.getDisplayImage().split(","))); evaluationDTO.setDisplayImageArr(Arrays.asList(evaluationDTO.getDisplayImage().split(",")));
evaluationDTO.setFeelImageArr(Arrays.asList(evaluationDTO.getFeelImage().split(","))); evaluationDTO.setFeelImageArr(Arrays.asList(evaluationDTO.getFeelImage().split(",")));
//是否收藏
boolean isCollect = yxEvaluationRelationService.isEvaluationRelation(id, uid);
evaluationDTO.setIsCollect(isCollect);
return evaluationDTO; return evaluationDTO;
} }
} }

11
zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/mapper/YxEvaluationRelationMapper.java

@ -3,7 +3,7 @@ package co.yixiang.modules.evaluation.service.mapper;
import co.yixiang.common.mapper.CoreMapper; import co.yixiang.common.mapper.CoreMapper;
import co.yixiang.modules.evaluation.domain.YxStoreEvaluationRelation; import co.yixiang.modules.evaluation.domain.YxStoreEvaluationRelation;
import co.yixiang.modules.evaluation.service.vo.YxStoreEvaluationRelationQueryVo; import co.yixiang.modules.evaluation.vo.YxStoreEvaluationRelationQueryVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
@ -23,11 +23,10 @@ import java.util.List;
public interface YxEvaluationRelationMapper extends CoreMapper<YxStoreEvaluationRelation> { public interface YxEvaluationRelationMapper extends CoreMapper<YxStoreEvaluationRelation> {
@Select("select B.id pid,A.type as category,B.home_image as homeImage,A.id id," + @Select("select B.id,B.home_image as homeImage" +
"B.is_show as isShow" + " from yx_store_evaluation_relation A left join yx_evaluation B " +
" from yx_evaluation_relation A left join yx_evaluation B " + "on A.evaluation_id = B.id where A.uid=#{uid} and A.is_del = 0 and B.is_del = 0 order by A.create_time desc")
"on A.evaluation_id = B.id where A.type=#{type} and A.uid=#{uid} and A.is_del = 0 and B.is_del = 0 order by A.create_time desc") List<YxStoreEvaluationRelationQueryVo> selectRelationList(Page page, @Param("uid") Long uid);
List<YxStoreEvaluationRelationQueryVo> selectRelationList(Page page, @Param("uid") Long uid, @Param("type") String type);
} }

2
zsw-bxg/src/main/java/co/yixiang/modules/evaluation/service/vo/YxStoreEvaluationRelationQueryVo.java → zsw-bxg/src/main/java/co/yixiang/modules/evaluation/vo/YxStoreEvaluationRelationQueryVo.java

@ -1,4 +1,4 @@
package co.yixiang.modules.evaluation.service.vo; package co.yixiang.modules.evaluation.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

3
zsw-bxg/src/main/java/co/yixiang/modules/inform/service/SendMsgService.java

@ -1,5 +1,6 @@
package co.yixiang.modules.inform.service; package co.yixiang.modules.inform.service;
public interface SendMsgService { public interface SendMsgService {
String inform(long orderId); //type:0 支付 1:申请退款
String inform(long orderId,int type);
} }

29
zsw-bxg/src/main/java/co/yixiang/modules/inform/service/impl/SendMsgServiceImpl.java

@ -1,10 +1,14 @@
package co.yixiang.modules.inform.service.impl; package co.yixiang.modules.inform.service.impl;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import cn.iocoder.yudao.framework.common.exception.YshopException;
import co.yixiang.constant.SystemConfigConstants;
import co.yixiang.modules.inform.domin.*; import co.yixiang.modules.inform.domin.*;
import co.yixiang.modules.inform.service.SendMsgService; import co.yixiang.modules.inform.service.SendMsgService;
import co.yixiang.modules.order.service.YxStoreOrderService; import co.yixiang.modules.order.service.YxStoreOrderService;
import co.yixiang.modules.order.service.dto.YxStoreOrderDto; import co.yixiang.modules.order.service.dto.YxStoreOrderDto;
import co.yixiang.modules.shop.service.YxSystemConfigService;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.apache.http.HttpStatus; import org.apache.http.HttpStatus;
@ -30,16 +34,21 @@ public class SendMsgServiceImpl implements SendMsgService {
@Autowired @Autowired
private TemplateCard templateCard; private TemplateCard templateCard;
@Autowired
private YxSystemConfigService systemConfigService;
@SneakyThrows @SneakyThrows
@Override @Override
public String inform(long orderId) { public String inform(long orderId,int type) {
CloseableHttpClient httpClient = HttpClients.createDefault();//实例化对象 CloseableHttpClient httpClient = HttpClients.createDefault();//实例化对象
String webhook_url="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=a2f0f8c9-e406-4f6b-86e4-d6ac9e4df88e"; // String webhook_url="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=a2f0f8c9-e406-4f6b-86e4-d6ac9e4df88e";
String webhook_url = systemConfigService.getData(SystemConfigConstants.ROBOT_URL);
if(StrUtil.isBlank(webhook_url)){
throw new YshopException("未配置企业微信群机器人");
}
HttpPost httpPost=new HttpPost(webhook_url); HttpPost httpPost=new HttpPost(webhook_url);
httpPost.addHeader("Content-Type", "application/json; charset=utf-8"); httpPost.addHeader("Content-Type", "application/json; charset=utf-8");
TemplateCard templateCard=this.creatTemplatecard(orderId,type);
TemplateCard templateCard=this.creatTemplatecard(orderId);
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("msgtype", "template_card"); param.put("msgtype", "template_card");
param.put("template_card", JSONObject.parseObject(JSONUtil.toJsonStr(templateCard))); param.put("template_card", JSONObject.parseObject(JSONUtil.toJsonStr(templateCard)));
@ -62,11 +71,18 @@ public class SendMsgServiceImpl implements SendMsgService {
return "发送微信机器人消息失败"; return "发送微信机器人消息失败";
} }
public TemplateCard creatTemplatecard(long orderId){ //创建订单消息
public TemplateCard creatTemplatecard(long orderId,int type){
YxStoreOrderDto yxStoreOrderDto=yxStoreOrderService.getOrderDetailByOrderId(orderId); YxStoreOrderDto yxStoreOrderDto=yxStoreOrderService.getOrderDetailByOrderId(orderId);
String mainTitle;
if (type==0){//支付时候
mainTitle="有新的在线订单来啦";
}else {
mainTitle="有新的退款申请";
}
templateCard.setCard_type("text_notice"); templateCard.setCard_type("text_notice");
templateCard.setSource(new Souce().setDesc("眼界甄选").setIcon_url("https://wework.qpic.cn/wwpic/252813_jOfDHtcISzuodLa_1629280209/0").setDesc_color(0)); templateCard.setSource(new Souce().setDesc("眼界甄选").setIcon_url("https://wework.qpic.cn/wwpic/252813_jOfDHtcISzuodLa_1629280209/0").setDesc_color(0));
templateCard.setMain_title(new MainTitle().setTitle("有新的在线订单来啦").setDesc("订单号:"+orderId)); templateCard.setMain_title(new MainTitle().setTitle(mainTitle).setDesc("订单号:"+orderId));
templateCard.setEmphasis_content(new EmphasisContent().setTitle(yxStoreOrderDto.getPayPrice().toString()).setDesc("订单总金额")); templateCard.setEmphasis_content(new EmphasisContent().setTitle(yxStoreOrderDto.getPayPrice().toString()).setDesc("订单总金额"));
// templateCard.setQuote_area(new QuoteArea().setType(0).setUrl("").setAppid("APPID").setTitle("订单详情").setQuote_text("眼镜*1 0.01")); // templateCard.setQuote_area(new QuoteArea().setType(0).setUrl("").setAppid("APPID").setTitle("订单详情").setQuote_text("眼镜*1 0.01"));
templateCard.setSub_title_text("订单类型:"+yxStoreOrderDto.getPinkName());//订单类型 templateCard.setSub_title_text("订单类型:"+yxStoreOrderDto.getPinkName());//订单类型
@ -82,4 +98,5 @@ public class SendMsgServiceImpl implements SendMsgService {
templateCard.setCard_action(new CardAction().setType(1).setUrl("https://work.weixin.qq.com/?from=openApi")); templateCard.setCard_action(new CardAction().setType(1).setUrl("https://work.weixin.qq.com/?from=openApi"));
return templateCard; return templateCard;
} }
} }

8
zsw-bxg/src/main/java/co/yixiang/modules/order/domain/YxStoreOrder.java

@ -8,9 +8,8 @@ package co.yixiang.modules.order.domain;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDomain; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDomain;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
@ -237,6 +236,9 @@ public class YxStoreOrder extends BaseDomain {
private Integer isSystemDel; private Integer isSystemDel;
@TableField(fill= FieldFill.INSERT)
private Integer isDel;
@ApiModelProperty(value = "实际支付积分") @ApiModelProperty(value = "实际支付积分")
private BigDecimal payIntegral; private BigDecimal payIntegral;

44
zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java

@ -39,6 +39,7 @@ import co.yixiang.modules.cart.domain.YxStoreCart;
import co.yixiang.modules.cart.service.YxStoreCartService; import co.yixiang.modules.cart.service.YxStoreCartService;
import co.yixiang.modules.cart.service.mapper.StoreCartMapper; import co.yixiang.modules.cart.service.mapper.StoreCartMapper;
import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; import co.yixiang.modules.cart.vo.YxStoreCartQueryVo;
import co.yixiang.modules.inform.service.SendMsgService;
import co.yixiang.modules.order.domain.YxExpress; import co.yixiang.modules.order.domain.YxExpress;
import co.yixiang.modules.order.domain.YxStoreOrder; import co.yixiang.modules.order.domain.YxStoreOrder;
import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; import co.yixiang.modules.order.domain.YxStoreOrderCartInfo;
@ -186,6 +187,8 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
@Autowired @Autowired
private ApplicationEventPublisher publisher; private ApplicationEventPublisher publisher;
@Autowired
private SendMsgService sendMsgService;
@Autowired @Autowired
private StoreAfterSalesService storeAfterSalesService; private StoreAfterSalesService storeAfterSalesService;
@ -205,30 +208,15 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
Map<String, ArrayList> cartGroup = yxStoreCartService.getUserProductCartList(uid, Map<String, ArrayList> cartGroup = yxStoreCartService.getUserProductCartList(uid,
cartIds, ShopConstants.ZSW_ONE_NUM); cartIds, ShopConstants.ZSW_ONE_NUM);
List<YxStoreCartQueryVo> list = new ArrayList<>(); List<YxStoreCartQueryVo> list = new ArrayList<>();
if (ObjectUtil.isNotEmpty(cartGroup.get("invalidProductList"))) {
throw new YshopException("有失效的商品请重新提交");
};
cartGroup.get("cartList").forEach(item->{ cartGroup.get("cartList").forEach(item->{
YxStoreBrandCart yxStoreBrandCart=(YxStoreBrandCart)item; YxStoreBrandCart yxStoreBrandCart=(YxStoreBrandCart)item;
if (ObjectUtil.isNotEmpty(yxStoreBrandCart.getInvalidProductList())) {
throw new YshopException("有失效的商品请重新提交");
}
if (ObjectUtil.isEmpty(yxStoreBrandCart.getValidProductList())) { if (ObjectUtil.isEmpty(yxStoreBrandCart.getValidProductList())) {
throw new YshopException("请提交购买的商品"); throw new YshopException("请提交购买的商品");
} }
list.addAll(yxStoreBrandCart.getValidProductList()); list.addAll(yxStoreBrandCart.getValidProductList());
// Class jsonClass = item.getClass();//通过item,获取运行时类的对象
// Field invalidProductList = null;
// Field validProductList = null;
// try {
// //获取item中的invalidProductList属性
// if (ObjectUtil.isNotEmpty(item.getClass().getDeclaredField("invalidProductList"))) {
// throw new YshopException("有失效的商品请重新提交");
// }
// if (ObjectUtil.isEmpty(item.getClass().getDeclaredField("validProductList"))) {
// throw new YshopException("请提交购买的商品");
// }
// } catch (NoSuchFieldException e) {
// e.printStackTrace();
// }
}); });
OtherDto other = new OtherDto(); OtherDto other = new OtherDto();
other.setIntegralRatio(systemConfigService.getData(SystemConfigConstants.INTERGRAL_RATIO)); other.setIntegralRatio(systemConfigService.getData(SystemConfigConstants.INTERGRAL_RATIO));
@ -932,7 +920,13 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
this.regressionCoupon(order, 0); this.regressionCoupon(order, 0);
yxStoreOrderMapper.deleteById(order.getId()); //更新订单状态
LambdaQueryWrapper<YxStoreOrder> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(YxStoreOrder::getOrderId, orderId);
YxStoreOrder storeOrder = new YxStoreOrder();
storeOrder.setStatus(OrderStatusEnum.STATUS_8.getValue());
yxStoreOrderMapper.update(storeOrder, wrapper);
// yxStoreOrderMapper.deleteById(order.getId());
} }
@ -1102,7 +1096,8 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
orderStatusService.create(order.getId(), orderStatusService.create(order.getId(),
OrderLogEnum.REFUND_ORDER_APPLY.getValue(), OrderLogEnum.REFUND_ORDER_APPLY.getValue(),
"用户申请退款,原因:" + text); "用户申请退款,原因:" + text);
//申请退款企业微信
sendMsgService.inform(Long.valueOf(orderId),1);
//模板消息发布事件 //模板消息发布事件
TemplateBean templateBean = TemplateBean.builder() TemplateBean templateBean = TemplateBean.builder()
.orderId(order.getOrderId()) .orderId(order.getOrderId())
@ -1141,6 +1136,11 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue()); .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue());
break; break;
case STATUS_8:
wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_0.getValue())
.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())
.eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_8.getValue());
break;
//待发货 //待发货
case STATUS_1: case STATUS_1:
wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue())
@ -1560,8 +1560,8 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
BillDetailEnum.TYPE_3.getValue(), BillDetailEnum.TYPE_3.getValue(),
orderInfo.getPayPrice().doubleValue(), userInfo.getNowMoney().doubleValue(), orderInfo.getPayPrice().doubleValue(), userInfo.getNowMoney().doubleValue(),
payTypeMsg + orderInfo.getPayPrice() + "元购买商品"); payTypeMsg + orderInfo.getPayPrice() + "元购买商品");
//支付成功企业微信
sendMsgService.inform(Long.valueOf(orderId),0);
//模板消息支付成功发布事件 //模板消息支付成功发布事件
TemplateBean templateBean = TemplateBean.builder() TemplateBean templateBean = TemplateBean.builder()
.orderId(orderInfo.getOrderId()) .orderId(orderInfo.getOrderId())

6
zsw-bxg/src/main/java/co/yixiang/modules/user/rest/MemberController.java

@ -8,6 +8,7 @@
*/ */
package co.yixiang.modules.user.rest; package co.yixiang.modules.user.rest;
import cn.iocoder.yudao.framework.common.exception.YshopException;
import co.yixiang.logging.aop.log.Log; import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.aop.ForbidSubmit;
import co.yixiang.modules.user.domain.YxUser; import co.yixiang.modules.user.domain.YxUser;
@ -32,6 +33,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
/** /**
* @author hupeng * @author hupeng
* @date 2019-10-06 * @date 2019-10-06
@ -70,6 +73,9 @@ public class MemberController {
@PutMapping(value = "/yxUser") @PutMapping(value = "/yxUser")
@PreAuthorize("@ss.hasAnyPermissions('admin','YXUSER_ALL','YXUSER_EDIT')") @PreAuthorize("@ss.hasAnyPermissions('admin','YXUSER_ALL','YXUSER_EDIT')")
public ResponseEntity update(@Validated @RequestBody YxUser resources){ public ResponseEntity update(@Validated @RequestBody YxUser resources){
// if (resources.getIntegral().compareTo(BigDecimal.valueOf(999999.99))>=0){
// throw new YshopException("999999.99");
// }
yxUserService.saveOrUpdate(resources); yxUserService.saveOrUpdate(resources);
return new ResponseEntity(HttpStatus.NO_CONTENT); return new ResponseEntity(HttpStatus.NO_CONTENT);
} }

2
zsw-bxg/src/main/java/co/yixiang/utils/EvaluationDTO.java

@ -31,6 +31,8 @@ public class EvaluationDTO implements Serializable {
@TableId @TableId
private Integer id; private Integer id;
/** 在列表里面的首页图 */
private Boolean isCollect;
/** 在列表里面的首页图 */ /** 在列表里面的首页图 */
private String homeImage; private String homeImage;

Loading…
Cancel
Save