Просмотр исходного кода

商品添加发货人手机号

yuhongqi 1 неделя назад
Родитель
Сommit
000ad4ed25

+ 30 - 0
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreDeliveryAbnormalOrderController.java

@@ -1,9 +1,13 @@
 package com.fs.hisStore.controller;
 
+import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.domain.model.LoginUser;
+import com.fs.common.enums.BusinessType;
 import com.fs.common.utils.CloudHostUtils;
+import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.common.utils.ParseUtils;
 import com.fs.common.utils.ServletUtils;
 import com.fs.common.utils.StringUtils;
@@ -31,6 +35,7 @@ import com.fs.hisStore.service.IFsStoreOrderItemScrmService;
 import com.fs.hisStore.service.IFsStoreOrderScrmService;
 import com.fs.hisStore.service.IFsStoreOrderStatusScrmService;
 import com.fs.hisStore.service.IFsStorePaymentScrmService;
+import com.fs.hisStore.vo.FsStoreDeliveryAbnormalOrderExportVO;
 import com.fs.hisStore.vo.FsStoreOrderAuditLogVO;
 import com.fs.hisStore.vo.FsStoreOrderVO;
 import com.github.pagehelper.PageHelper;
@@ -130,6 +135,31 @@ public class FsStoreDeliveryAbnormalOrderController extends BaseController {
         return vo;
     }
 
+    /**
+     * 导出物流异常订单
+     */
+    @PreAuthorize("@ss.hasPermi('store:storeDeliveryAbnormalOrder:export')")
+    @Log(title = "物流异常订单", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public AjaxResult export(@RequestBody FsStoreOrderParam param) {
+        normalizeTimeRange(param);
+        param.setDeliveryStatus(4);
+        if (fsStoreOrderService.isEntityNull(param)) {
+            return AjaxResult.error("请筛选数据导出");
+        }
+        List<FsStoreOrderVO> list = fsStoreOrderService.selectFsStoreOrderListVO(param);
+        maskSensitiveFields(list);
+        List<FsStoreDeliveryAbnormalOrderExportVO> exportList = new ArrayList<>();
+        for (FsStoreOrderVO vo : list) {
+            FsStoreDeliveryAbnormalOrderExportVO exportVO = new FsStoreDeliveryAbnormalOrderExportVO();
+            BeanUtils.copyProperties(vo, exportVO);
+            exportList.add(exportVO);
+        }
+        ExcelUtil<FsStoreDeliveryAbnormalOrderExportVO> util =
+                new ExcelUtil<>(FsStoreDeliveryAbnormalOrderExportVO.class);
+        return util.exportExcel(exportList, "物流异常订单");
+    }
+
     /**
      * 获取物流异常订单详情
      */

+ 3 - 8
fs-company-app/src/main/java/com/fs/app/controller/LiveController.java

@@ -32,22 +32,19 @@ public class LiveController extends AppBaseController {
     @Autowired
     private ILiveSortLinkService liveSortLinkService;
 
-    @Login
+
     @GetMapping("/pageList")
     @ApiOperation("未开播/直播中直播间分页列表")
     public ResponseResult<PageInfo<Live>> pageList(FsLiveListParam param) {
         PageHelper.startPage(param.getPageNum(), param.getPageSize());
-        param.setCompanyId(getCompanyId());
         List<Live> list = liveService.listAppAvailableLive(param);
         return ResponseResult.ok(new PageInfo<>(list));
     }
 
-    @Login
+
     @PostMapping("/liveSortLink")
     @ApiOperation("生成直播分享链接")
     public R createLiveSortLink(@RequestBody FsLiveSortLinkParam param) {
-        param.setCompanyId(getCompanyId());
-        param.setCompanyUserId(getCompanyUserId());
         R liveSortLink = liveSortLinkService.createLiveSortLink(param);
         Object url = liveSortLink.get("url");
         if (url == null) {
@@ -60,12 +57,10 @@ public class LiveController extends AppBaseController {
         return R.ok(map);
     }
 
-    @Login
+
     @PostMapping("/liveSortLinkTo")
     @ApiOperation("生成直播分享短链(APP发课)")
     public R createLiveSortLinkTo(@RequestBody FsLiveSortLinkParam param) {
-        param.setCompanyId(getCompanyId());
-        param.setCompanyUserId(getCompanyUserId());
         R liveSortLink = liveSortLinkService.createAppLiveSortLink(param);
         Object url = liveSortLink.get("url");
         if (url == null) {

+ 4 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java

@@ -322,6 +322,10 @@ public class FsStoreProductScrm extends BaseEntity
     @Excel(name = "退货地址")
     private String returnAddress;
 
+    /** 发货人手机号,多个逗号分隔,最多3个 */
+    @Excel(name = "发货人手机号")
+    private String senderPhones;
+
 
     /** 原产地 */
     @Excel(name = "原产地")

+ 4 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductAddEditParam.java

@@ -268,6 +268,10 @@ public class FsStoreProductAddEditParam implements Serializable
     @Excel(name = "退货地址")
     private String returnAddress;
 
+    /** 发货人手机号,多个逗号分隔,最多3个 */
+    @Excel(name = "发货人手机号")
+    private String senderPhones;
+
 
     private Integer isDrug;
 

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

@@ -678,6 +678,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
             }
             return rows;
         }
+        if (fsStoreOrder.getDeliveryType() != null && "4".equals(fsStoreOrder.getDeliveryType())) {
+            fsStoreOrder.setDeliveryExceptionStatus(1);
+        }
 
         return fsStoreOrderMapper.updateFsStoreOrder(fsStoreOrder);
     }

+ 54 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreDeliveryAbnormalOrderExportVO.java

@@ -0,0 +1,54 @@
+package com.fs.hisStore.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 物流异常订单导出
+ */
+@Data
+public class FsStoreDeliveryAbnormalOrderExportVO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @Excel(name = "ID")
+    private Long id;
+
+    @Excel(name = "所属公司")
+    private String companyName;
+
+    @Excel(name = "所属员工")
+    private String companyUserNickName;
+
+    @Excel(name = "订单单号")
+    private String orderCode;
+
+    @Excel(name = "会员手机号")
+    private String userPhone;
+
+    @Excel(name = "订单状态", dictType = "store_order_status")
+    private String status;
+
+    @Excel(name = "物流状态", dictType = "store_order_delivery_status")
+    private Integer deliveryStatus;
+
+    @Excel(name = "物流单号")
+    private String deliveryId;
+
+    @Excel(name = "异常状态", dictType = "store_order_delivery_type")
+    private String deliveryType;
+
+    @Excel(name = "处理状态", readConverterExp = "1=待处理,2=已处理")
+    private Integer deliveryExceptionStatus;
+
+    @Excel(name = "异常备注")
+    private String deliveryExceptionRemark;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+}

+ 9 - 1
fs-service/src/main/resources/db/changelog/changes/20260613-live-user-add-is-del.sql

@@ -74,4 +74,12 @@ ALTER TABLE fs_course_coupon_user
 --precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'fs_integral_order' AND column_name = 'virtual_phone'
 ALTER TABLE `fs_integral_order`
     ADD COLUMN `virtual_phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '虚拟手机号' AFTER `quantity_cart`;
---rollback ALTER TABLE fs_integral_order DROP COLUMN type;
+--rollback ALTER TABLE fs_integral_order DROP COLUMN type;
+
+--changeset yhq:20260623-fs-store-product-sender-phones
+--preconditions onFail:MARK_RAN
+--precondition-sql-check expectedResult:1 SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'fs_store_product_scrm'
+--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'fs_store_product_scrm' AND column_name = 'sender_phones'
+ALTER TABLE fs_store_product_scrm
+    ADD COLUMN sender_phones VARCHAR(128) NULL DEFAULT NULL COMMENT '发货人手机号,多个逗号分隔,最多3个';
+--rollback ALTER TABLE fs_store_product_scrm DROP COLUMN sender_phones;

+ 7 - 2
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -69,6 +69,7 @@
         <result property="isAudit" column="is_audit"/>
         <result property="storeId" column="store_id"/>
         <result property="returnAddress"    column="return_address"    />
+        <result property="senderPhones"    column="sender_phones"    />
         <result property="brand"    column="brand"    />
         <result property="foodProductionLicenseCode"    column="food_production_license_code"    />
         <result property="originPlace"    column="origin_place"    />
@@ -92,7 +93,7 @@
                integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,
                is_display,tui_cate_id,company_ids,is_drug,drug_image,drug_reg_cert_no,common_name,dosage_form,
                unit_price,batch_number,mah,mah_address,manufacturer,manufacturer_address,indications,dosage,
-               adverse_reactions,contraindications,precautions,is_audit,store_id,return_address,brand,food_production_license_code,
+               adverse_reactions,contraindications,precautions,is_audit,store_id,return_address,sender_phones,brand,food_production_license_code,
                origin_place,net_content,shelf_life,domestic_imported,app_ids,purchase_limit,single_purchase_limit,activity_type,activity_start_time,activity_end_time,tag_info
         from fs_store_product_scrm
     </sql>
@@ -105,7 +106,7 @@
                p.integral, p.product_type, p.prescribe_code, p.prescribe_spec, p.prescribe_factory, p.prescribe_name,
                p.is_display,p.tui_cate_id,p.company_ids,p.is_drug,p.drug_image,p.drug_reg_cert_no,p.common_name,p.dosage_form,
                p.unit_price,p.batch_number,p.mah,p.mah_address,p.manufacturer,p.manufacturer_address,p.indications,p.dosage,
-               p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,p.return_address,p.brand,p.food_production_license_code,
+               p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,p.return_address,p.sender_phones,p.brand,p.food_production_license_code,
                p.origin_place,p.net_content,p.shelf_life,p.domestic_imported,app_ids,p.purchase_limit,p.single_purchase_limit,p.activity_type,p.tag_info
         from fs_store_product_scrm p
     </sql>
@@ -186,6 +187,7 @@
             <if test="netContent != null and netContent != ''">and net_content = #{netContent} </if>
             <if test="shelfLife != null">and shelf_life = #{shelfLife} </if>
             <if test="domesticImported != null and domesticImported != ''">and domestic_imported = #{domesticImported} </if>
+            <if test="senderPhones != null and senderPhones != ''">and sender_phones like concat('%', #{senderPhones}, '%') </if>
         </where>
     </select>
 
@@ -282,6 +284,7 @@
             <if test="isAudit != null and isAudit != ''">is_audit ,</if>
             <if test="storeId != null and storeId != ''">store_id ,</if>
             <if test="returnAddress != null">return_address,</if>
+            <if test="senderPhones != null">sender_phones,</if>
             <if test="brand != null and brand != ''">brand,</if>
             <if test="foodProductionLicenseCode != null and foodProductionLicenseCode != ''">food_production_license_code,</if>
             <if test="originPlace != null and originPlace != ''">origin_place,</if>
@@ -358,6 +361,7 @@
             <if test="isAudit != null and isAudit != ''">#{isAudit} ,</if>
             <if test="storeId != null and storeId != ''">#{storeId} ,</if>
             <if test="returnAddress != null">#{returnAddress},</if>
+            <if test="senderPhones != null">#{senderPhones},</if>
             <if test="brand != null and brand != ''">#{brand},</if>
             <if test="foodProductionLicenseCode != null and foodProductionLicenseCode != ''">#{foodProductionLicenseCode},</if>
             <if test="originPlace != null and originPlace != ''">#{originPlace},</if>
@@ -438,6 +442,7 @@
             <if test="isAudit != null and isAudit != ''">is_audit = #{isAudit} ,</if>
             <if test="storeId != null and storeId != ''">store_id = #{storeId} ,</if>
             <if test="returnAddress != null">return_address = #{returnAddress},</if>
+            <if test="senderPhones != null">sender_phones = #{senderPhones},</if>
             <if test="brand != null and brand != ''">brand = #{brand},</if>
             <if test="foodProductionLicenseCode != null and foodProductionLicenseCode != ''">food_production_license_code = #{foodProductionLicenseCode},</if>
             <if test="originPlace != null">origin_place = #{originPlace},</if>