zhangxin преди 3 седмици
родител
ревизия
4ef91b4295

+ 3 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/my/AppEvaluateController.java

@@ -51,8 +51,10 @@ public class AppEvaluateController {
     @Operation(summary = "app评价分页查询")
     public Result<IPage<FindEvaluateResponseDTO>> findByList(PageDTO pageDTO) {
         FindEvaluateRequestDTO findEvaluateRequestDTO = new FindEvaluateRequestDTO();
+        LoginUser principal = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        findEvaluateRequestDTO.setUserId(principal.getId());
         findEvaluateRequestDTO.setCheckStatus(1);
-        return Result.ok(evaluateService.findPage(pageDTO.getPageNo(), pageDTO.getPageSize(), null));
+        return Result.ok(evaluateService.findPage(pageDTO.getPageNo(), pageDTO.getPageSize(), findEvaluateRequestDTO));
     }
 
 

+ 14 - 10
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/OrderServiceImpl.java

@@ -1618,13 +1618,13 @@ public class OrderServiceImpl implements IOrderService {
                     return stringStringMap;
                 }
                 SeparateAccounts separateAccounts = separateAccountsMapper.findByDeptIdAndStatus(sysDepart.getId());
-                ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVoMd = new ReceiptPaymentDetailsInfoVo();
-                receiptPaymentDetailsInfoVoMd.setMoney(priceSum);
-                receiptPaymentDetailsInfoVoMd.setPayType(0);
-                receiptPaymentDetailsInfoVoMd.setPurseChangeReason(0);
-                receiptPaymentDetailsInfoVoMd.setCreateTime(new Date());
-                receiptPaymentDetailsInfoVoMd.setUpdateTime(new Date());
-                receiptPaymentDetailsInfoVoMd.setOrderId(appOrder.getId());
+                ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVo = new ReceiptPaymentDetailsInfoVo();
+                receiptPaymentDetailsInfoVo.setMoney(priceSum);
+                receiptPaymentDetailsInfoVo.setPayType(0);
+                receiptPaymentDetailsInfoVo.setPurseChangeReason(0);
+                receiptPaymentDetailsInfoVo.setCreateTime(new Date());
+                receiptPaymentDetailsInfoVo.setUpdateTime(new Date());
+                receiptPaymentDetailsInfoVo.setOrderId(appOrder.getId());
                 if (separateAccounts==null){
                     //需要按照默认比例分账 -暂时未处理。
                     log.error("微信支付成功通知成功,未查询到分账信息,不进行分账");
@@ -1643,9 +1643,12 @@ public class OrderServiceImpl implements IOrderService {
                     log.error("百分比计算错误", e);
                 }
                 BigDecimal mdBigDecimal = priceSum.subtract(shBigDecimal).subtract(ptBigDecimal).setScale(2, RoundingMode.HALF_UP);
+                ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVoMd = getChangeMoney(receiptPaymentDetailsInfoVo, appOrder.getOrgCode(), appOrder.getTenantId(), 2, mdBigDecimal);
+                ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVoSh = getChangeMoney(receiptPaymentDetailsInfoVo, sysDepart.getOrgCode(), sysDepart.getId(), 1, shBigDecimal);
+                ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVoPt = getChangeMoney(receiptPaymentDetailsInfoVo, sysDepart.getOrgCode(), sysDepart.getId(), 1, shBigDecimal);
 
-                log.info("支付成功消息通知,门店添加明细:"+JSONObject.toJSONString(receiptPaymentDetailsInfoVoMd));
-                iReceiptPaymentDetailsInfoService.add(receiptPaymentDetailsInfoVoMd);
+                log.info("支付成功消息通知,门店添加明细:"+JSONObject.toJSONString(receiptPaymentDetailsInfoVo));
+                iReceiptPaymentDetailsInfoService.add(receiptPaymentDetailsInfoVo);
             }
 
         }
@@ -1654,11 +1657,12 @@ public class OrderServiceImpl implements IOrderService {
 
 
 
-    private void  getChangeMoney(ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVo,String orgCode,String deptId,Integer deptType,BigDecimal changeMoney){
+    private ReceiptPaymentDetailsInfoVo  getChangeMoney(ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVo,String orgCode,String deptId,Integer deptType,BigDecimal changeMoney){
         receiptPaymentDetailsInfoVo.setDeptId(deptId);
         receiptPaymentDetailsInfoVo.setDeptType(deptType);
         receiptPaymentDetailsInfoVo.setOrgCode(orgCode);
         receiptPaymentDetailsInfoVo.setChangeMoney(changeMoney);
+        return receiptPaymentDetailsInfoVo;
     }
     private BigDecimal getBigDecimal(BigDecimal priceSum,BigDecimal proportion){
         if (proportion==null){

+ 3 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/evaluate/FindEvaluateRequestDTO.java

@@ -47,5 +47,8 @@ public class FindEvaluateRequestDTO {
     /**创建时间;创建时间*/
     @Schema(description = "提交结束时间")
     private String endTime;
+    /**用户id*/
+    @Schema(description = "用户id")
+    private String userId;
 
 }

+ 3 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/EvaluateMapper.xml

@@ -20,6 +20,9 @@
         <if test="findEvaluateRequestDTO.score!=null">
             AND ne.score = #{findEvaluateRequestDTO.score}
         </if>
+        <if test="findEvaluateRequestDTO.userId!=null and findEvaluateRequestDTO.userId!='">
+            AND ne.user_id = #{findEvaluateRequestDTO.userId}
+        </if>
         <if test="findEvaluateRequestDTO.checkStatus!=null">
              AND ne.check_status = #{findEvaluateRequestDTO.checkStatus}
         </if>

+ 6 - 4
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/EvaluateServiceImpl.java

@@ -44,10 +44,12 @@ public class EvaluateServiceImpl extends ServiceImpl<EvaluateMapper, Evaluate> i
         if (findEvaluateResponseDTOIPage!=null&&findEvaluateResponseDTOIPage.getRecords()!=null){
             for (FindEvaluateResponseDTO record : findEvaluateResponseDTOIPage.getRecords()) {
                 List<String> strings = new ArrayList<>();
-                if (StringUtils.isNotEmpty(record.getImages())&&record.getImages().indexOf(",")>0){
-                    strings = Arrays.asList(record.getImages().split(","));
-                }else {
-                    strings.add(record.getImages());
+                if (StringUtils.isNotEmpty(record.getImages())) {
+                    if (record.getImages().indexOf(",")>0){
+                        strings = Arrays.asList(record.getImages().split(","));
+                    }else {
+                        strings.add(record.getImages());
+                    }
                 }
                 if (record.getIsAnonymous()!=null&&record.getIsAnonymous()==0){
                     String username = record.getUsername();