Bladeren bron

Merge remote-tracking branch 'origin/master'

yuhongqi 2 weken geleden
bovenliggende
commit
9e708f4c76

+ 14 - 0
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreOrderScrmController.java

@@ -1137,6 +1137,20 @@ public class FsStoreOrderScrmController extends BaseController {
         return R.ok("成功审核 " + count + " 条订单");
     }
 
+    @ApiOperation("订单备注")
+    @Log(title = "订单管理", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('store:storeOrder:remark')")
+    @PostMapping("/remark")
+    public R remark(@Validated @RequestBody FsStoreOrderScrm param) {
+        if (param.getId() == null || param.getId() == 0) {
+            return R.error("订单ID错误");
+        }
+        if (StringUtils.isEmpty(param.getOrderRemark())) {
+            return R.error("订单备注不能为空");
+        }
+        return fsStoreOrderService.orderRemark(param);
+    }
+
     private FsStoreOrderDf getDFInfo(String loginAccount) {
         //查询订单账户 判断是否存在该订单账户
         List<FsDfAccount> erpAccounts = fsDfAccountService.selectFsDfAccountList(null);

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwExternalContactController.java

@@ -722,7 +722,7 @@ public class QwExternalContactController extends BaseController
 
         return  qwExternalContactService.setCustomerCourseSopList(param);
     }
-    @PreAuthorize("@ss.hasPermi('qw:externalContact:edit')")
+    @PreAuthorize("@ss.hasPermi('qw:externalContact:edit') or @ss.hasPermi('qw:externalContact:deptEdit') or @ss.hasPermi('qw:externalContact:myEdit')")
     @Log(title = "批量修改备注", businessType = BusinessType.UPDATE)
     @PostMapping("/batchUpdateExternalContactNotes")
     public R batchUpdateExternalContactNotes(@RequestBody QwExternalContactUpdateNoteParam param) throws JSONException {

+ 5 - 0
fs-service/src/main/java/com/fs/hisStore/service/IFsStoreOrderScrmService.java

@@ -357,4 +357,9 @@ public interface IFsStoreOrderScrmService
      * @return 更新条数
      */
     int batchAuditOrder(FsStoreOrderBatchAuditParam param);
+
+    /**
+     * 订单备注
+     */
+    R orderRemark(FsStoreOrderScrm orderScrm);
 }

+ 17 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -5586,6 +5586,23 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
         return fsStoreOrderMapper.batchUpdateAuditStatus(param.getOrderIds(), param.getIsAudit());
     }
 
+    @Override
+    public R orderRemark(FsStoreOrderScrm orderScrm) {
+        FsStoreOrderScrm order = fsStoreOrderMapper.selectFsStoreOrderById(orderScrm.getId());
+        if (order != null) {
+            FsStoreOrderScrm map = new FsStoreOrderScrm();
+            map.setId(orderScrm.getId());
+            map.setOrderRemark(orderScrm.getOrderRemark());
+
+            if (fsStoreOrderMapper.updateFsStoreOrder(map) > 0) {
+                return R.ok();
+            } else {
+                return R.error("备注失败");
+            }
+        }
+        return R.error("未找到订单");
+    }
+
     private static final DateTimeFormatter CST_FORMATTER = DateTimeFormatter
             .ofPattern("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US)
             .withZone(ZoneId.of("Asia/Shanghai"));

+ 7 - 1
fs-service/src/main/java/com/fs/live/service/impl/LiveOrderServiceImpl.java

@@ -1654,6 +1654,12 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
                 userService.subLiveTuiMoney(liveOrder);
             }
         }
+        //优惠券返回
+        if(order.getUserCouponId()!=null){
+            // 退券
+            order.setCouponUserId(Long.parseLong(order.getUserId()));
+            this.refundCoupon(order);
+        }
         // 删除限购记录
         deletePurchaseLimitRecordsForLiveOrder(order);
 
@@ -4025,7 +4031,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
         // 使用 productService.decProductStock 方法,该方法已包含库存检查逻辑
         fsStoreProductService.decProductStock(productId, attrValueId, num);
     }
-    
+
     private void checkPurchaseLimitForLiveOrder(Long userId, Long productId, Integer num) {
         // 查询商品信息
         FsStoreProductScrm product = fsStoreProductService.selectFsStoreProductById(productId);

+ 9 - 9
fs-service/src/main/resources/application-config-druid-xcsw.yml

@@ -10,8 +10,8 @@ logging:
 wx:
   miniapp:
     configs:
-      - appid: wx94951f52d3ac5e25   #北京存在文化
-        secret: bfe27b20c6e3c4232a1d4ef36228e84b #北京存在文化
+      - appid: wx94951f52d3ac5e25   #星辰生物
+        secret: bfe27b20c6e3c4232a1d4ef36228e84b #星辰生物
         token: Ncbnd7lJvkripxxna6NAWCxCrvC
         aesKey: HlEiBB55eaWUaeBVAQO3cWKWPYv1vOVQSq7nFNICw4E
         msgDataFormat: JSON
@@ -57,11 +57,11 @@ watch:
   password3: v9xsKuqn_$d2y
 
 fs :
-  commonApi: http://10.206.0.12:7771
-  h5CommonApi: http://10.206.0.12:7771
+  commonApi: http://192.168.0.160:7771
+  h5CommonApi: http://192.168.0.160:7771
   jwt:
     # 加密秘钥
-    secret: 3e6d9c0b4a7f1e2d5c4e0d3c6b9a2f5e
+    secret: 666d9c0b4a7f1e2d5c4e0d3c6b9a2fff
     # token有效时长,7天,单位秒
     expire: 31536000
     header: AppToken
@@ -93,10 +93,10 @@ headerImg:
   imgUrl:
 
 ipad:
-  ipadUrl: http://ipad.ljhehualu.com
-  aiApi: http://49.232.181.28:3000/api
-  voiceApi: http://129.28.187.88:8667
-  commonApi: http://129.28.187.88:7771
+  ipadUrl: http://ipad.zgfjfzxhxc.com
+  aiApi:
+  voiceApi:
+  commonApi: http://192.168.0.160:7771
 wx_miniapp_temp:
   pay_order_temp_id:
   inquiry_temp_id:

+ 1 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml

@@ -434,6 +434,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="followTime != null">follow_time = #{followTime},</if>
             <if test="followDoctorId != null">follow_doctor_id = #{followDoctorId},</if>
             <if test="cycle != null">cycle = #{cycle},</if>
+            <if test="orderRemark != null">order_remark = #{orderRemark},</if>
         </trim>
         where id = #{id}
     </update>