采购配置相关
parent
71fd49ead1
commit
e28a4784f9
@ -0,0 +1,7 @@
|
||||
package com.ms.api.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class GetPurchaseSettingResponseDTO {
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.ms.api.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PurchaseSettingDTO {
|
||||
/**
|
||||
* 是否自动同步采购信息到商家备注
|
||||
*/
|
||||
private int isAppendShopRemark;
|
||||
|
||||
/**
|
||||
* 商家备注模板
|
||||
*/
|
||||
private String appendShopRemarkTpl;
|
||||
|
||||
/**
|
||||
* 是否自动同步采购信息到本地备注
|
||||
*/
|
||||
private int isAppendShopNote;
|
||||
|
||||
/**
|
||||
* 本地备注模板
|
||||
*/
|
||||
private String appendShopNoteTpl;
|
||||
|
||||
/**
|
||||
* 商家备注旗帜
|
||||
*/
|
||||
private int shopRemarkFlag;
|
||||
|
||||
/**
|
||||
* 是否开启下单自动填写买家留言
|
||||
*/
|
||||
private int isAutoFillRemark;
|
||||
|
||||
/**
|
||||
* 自动添加下单买家留言模板
|
||||
*/
|
||||
private String autoFillRemarkTpl;
|
||||
|
||||
/**
|
||||
* 是否开启下单自动填写备忘
|
||||
*/
|
||||
private int isAutoFillOrderMemo;
|
||||
|
||||
/**
|
||||
* 下单自动填写备忘模板
|
||||
*/
|
||||
private String autoFillOrderMemoTpl;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ms.api.spi.order;
|
||||
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.ms.api.common.SPIBaseService;
|
||||
import com.ms.api.dto.order.GetPurchaseSettingResponseDTO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ExtensionService("getPurchaseSetting")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class GetPurchaseSettingService extends SPIBaseService implements ExtensionServiceHandler<Void, GetPurchaseSettingResponseDTO> {
|
||||
@Override
|
||||
public BaseResponse<GetPurchaseSettingResponseDTO> handle(BaseRequest<Void> req) {
|
||||
// GetPurchaseSettingRequestDTO requestDTO = req.getData();
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.ms.api.tool;
|
||||
|
||||
import com.ms.api.consts.PurchaseOrderConst;
|
||||
|
||||
public class PurchaseTool {
|
||||
|
||||
/**
|
||||
* 替换掉电话号码相关标签
|
||||
* 如去掉 <span contenteditable="false" data-field="receiver_mobile">13366667777</span>
|
||||
* @param tpl
|
||||
* @return
|
||||
*/
|
||||
public static String removeRemarkMobileTplHashTag(String tpl) {
|
||||
// String tpl = "asdasdas<span contenteditable=\"false\" data-field=\"receiver_mobile\">#+861222352531#</span>afafafafafafaf";
|
||||
return tpl.replaceAll("<span contenteditable=\"false\" data-field=\"receiver_mobile\">#(?:[^#]+)#</span>", "");
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成默认备注模板
|
||||
* @return
|
||||
*/
|
||||
public static String getDefaultAppendVenderRemarkTpl() {
|
||||
String[] arr = {
|
||||
String.format("<span contenteditable=\"false\" data-field=\"%s\">#%s#</span>", PurchaseOrderConst.PURCHASE_PLATFORM2_FIELD, "采购平台").toString(),
|
||||
String.format("<span contenteditable=\"false\" data-field=\"%s\">#%s#</span>", PurchaseOrderConst.PURCHASE_ORDER_SN_FIELD, "采购单号").toString(),
|
||||
String.format("<span contenteditable=\"false\" data-field=\"%s\">#%s#</span>", PurchaseOrderConst.LOGISTICS_INFO_FIELD, "快递及运单号").toString(),
|
||||
String.format("<span contenteditable=\"false\" data-field=\"%s\">#%s#</span>", PurchaseOrderConst.PURCHASE_ORDER_BUYER, "采购账号").toString(),
|
||||
};
|
||||
return String.join("#", arr);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue