diff --git a/yudao-admin-vue3/public/favicon.ico b/yudao-admin-vue3/public/favicon.ico index cb16081..31ff724 100644 Binary files a/yudao-admin-vue3/public/favicon.ico and b/yudao-admin-vue3/public/favicon.ico differ diff --git a/yudao-admin-vue3/src/api/mall/promotion/intelligent/index.ts b/yudao-admin-vue3/src/api/mall/promotion/intelligent/index.ts new file mode 100644 index 0000000..4287328 --- /dev/null +++ b/yudao-admin-vue3/src/api/mall/promotion/intelligent/index.ts @@ -0,0 +1,40 @@ +import request from '@/config/axios' + +export interface ArticleVO { + id: number + title: string + collectionQuantity: string + pageView: string + introduction: string + inputarr: string[] +} + +// 查询文章管理列表 +export const selectDynamicData = async () => { + return await request.get({ url: `/intelligentForm/selectDynamicData` }) +} + +// // 查询文章管理详情 +// export const saveDynamicData = async (id: number) => { +// return await request.get({ url: `/promotion/article/get?id=` + id }) +// } + +// 新增文章管理 +export const saveDynamicData = async (data: ArticleVO) => { + return await request.post({ url: `/intelligentForm/saveDynamicData`, data }) +} + +// 查询文章管理列表 +export const collectDataList = async (query: any) => { + return await request.get({ url: `/intelligentForm/collectDataList`, query }) +} + +// // 修改文章管理 +// export const updateArticle = async (data: ArticleVO) => { +// return await request.put({ url: `/promotion/article/update`, data }) +// } + +// // 删除文章管理 +// export const deleteArticle = async (id: number) => { +// return await request.delete({ url: `/promotion/article/delete?id=` + id }) +// } diff --git a/yudao-admin-vue3/src/views/mall/promotion/intelligent/index.vue b/yudao-admin-vue3/src/views/mall/promotion/intelligent/index.vue new file mode 100644 index 0000000..8e3ed48 --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/promotion/intelligent/index.vue @@ -0,0 +1,280 @@ + + + + + + + + + + 新建表单 + + + + + + + + {{o.title}} + 推广 + + + + + + + + 总浏览量 + {{o.pageView}} + + + 采集数量 + {{o.collectionQuantity}} + + + + + 创建人:{{o.createPeople}} + + 创建时间:{{o.createTime}} + + + + + + + + + + + + 标题 + + + + + 字段 + + + 添加字段 + + + + + + + 确 定 + 取 消 + + + + + + + 复制 + + + + + + + + + + + + + + + + {{scope.row[item]}} + + + + + + + + + + diff --git a/yudao-module-mall/yudao-module-promotion-biz/pom.xml b/yudao-module-mall/yudao-module-promotion-biz/pom.xml index a3bf649..b27e387 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/pom.xml +++ b/yudao-module-mall/yudao-module-promotion-biz/pom.xml @@ -73,6 +73,12 @@ cn.iocoder.boot yudao-spring-boot-starter-excel + + + + org.springframework.boot + spring-boot-starter-data-mongodb + diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/dynamic/DynamicDataController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/dynamic/DynamicDataController.java new file mode 100644 index 0000000..d48cb09 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/dynamic/DynamicDataController.java @@ -0,0 +1,62 @@ +package cn.iocoder.yudao.module.promotion.controller.admin.dynamic; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicData; +import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicForm; +import cn.iocoder.yudao.module.promotion.service.dynamic.DynamicDataService; +import cn.iocoder.yudao.module.promotion.service.dynamic.DynamicFormService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +/** + * 智能表单模块 + */ + +@RestController +@RequestMapping("/intelligentForm") +public class DynamicDataController { + @Autowired + private MongoTemplate mongoTemplate; + @Autowired + private DynamicDataService dynamicDataService; + @Autowired + private DynamicFormService dynamicFormService; + + //保存数据 + @PostMapping("/saveDynamicData") + public CommonResult saveDynamicData(@RequestBody Map requestData, HttpServletRequest httpServletRequest) { + dynamicDataService.doSaveDynamicData(requestData,httpServletRequest); + return success("保存成功"); + } + + //查询全部数据 + @GetMapping("/selectDynamicData") + public CommonResult> selectDynamicData(HttpServletRequest httpServletRequest) { + return success(dynamicDataService.doSelectDynamicData(httpServletRequest)); + } + //根据id查询数据 + @GetMapping("/selectDynamicDataById") + public CommonResult selectDynamicDataById(String id){ + return success(dynamicDataService.doSelectDynamicDataById(id)); + } + + //采集数据 + @PostMapping("/collectData") + public CommonResult collectData(@RequestBody DynamicForm dynamicForm){ + dynamicFormService.doCollectData(dynamicForm); + return success("保存成功"); + } + //根据卡片id查询对应采集数据的列表 + @GetMapping("/collectDataList") + public CommonResult> collectDataList(String id){ + return success(dynamicFormService.doCollectDataList(id)); + } + +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/dynamic/DynamicData.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/dynamic/DynamicData.java new file mode 100644 index 0000000..0fe7025 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/dynamic/DynamicData.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic; + +import lombok.Data; +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import java.util.Map; + +@Document(collection = "dynamicData") +@Data +public class DynamicData { + @Id + private String id; + private String title; + //总浏览量 + private String pageView; + //采集数量 + private String collectionQuantity; + //创建者 + private String createPeople; + //创建时间 + private String createTime; + //租户名称 + private String tenantName; + //用户字段数据 + private Map data; +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/dynamic/DynamicForm.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/dynamic/DynamicForm.java new file mode 100644 index 0000000..148e572 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/dynamic/DynamicForm.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic; + +import lombok.Data; +import org.springframework.data.annotation.Id; + +import java.util.Map; + +@Data +public class DynamicForm { + @Id + private String id; + //关联后台智能表单id + private String dynamicDataId; + //采集数据 + private Map map; +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/repository/DynamicDataRepository.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/repository/DynamicDataRepository.java new file mode 100644 index 0000000..f92dbfc --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/repository/DynamicDataRepository.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.promotion.dal.mysql.repository; + +import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicData; +import org.apache.ibatis.annotations.Mapper; +import org.bson.types.ObjectId; +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import java.util.List; + +//@Repository +@Mapper +public interface DynamicDataRepository extends MongoRepository { + List findByTenantName(String tenantName); + @Query("{'_id': {'$eq': ?0}}") + DynamicData doFindById(ObjectId id); +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/repository/DynamicFormRepository.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/repository/DynamicFormRepository.java new file mode 100644 index 0000000..7aa22af --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/repository/DynamicFormRepository.java @@ -0,0 +1,15 @@ +package cn.iocoder.yudao.module.promotion.dal.mysql.repository; + +import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicForm; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.stereotype.Repository; + +import java.util.List; + +//@Repository +@Mapper +public interface DynamicFormRepository extends MongoRepository { + Long countAllByDynamicDataId(String dynamicDataId); + List findByDynamicDataId(String id); +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/dynamic/DynamicDataService.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/dynamic/DynamicDataService.java new file mode 100644 index 0000000..08503cf --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/dynamic/DynamicDataService.java @@ -0,0 +1,74 @@ +package cn.iocoder.yudao.module.promotion.service.dynamic; + +import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicData; +import cn.iocoder.yudao.module.promotion.dal.mysql.repository.DynamicDataRepository; +import cn.iocoder.yudao.module.promotion.dal.mysql.repository.DynamicFormRepository; +import org.bson.types.ObjectId; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletRequest; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId; + + +@Service +public class DynamicDataService { + @Autowired + private DynamicDataRepository dynamicDataRepository; + @Autowired + private DynamicFormRepository dynamicFormRepository; + + //保存数据 + public DynamicData doSaveDynamicData(Map requestData, HttpServletRequest httpServletRequest){ + DynamicData dynamicData = new DynamicData(); + //构造数据结构 + String title = (String)requestData.get("title"); + String pageView = (String)requestData.get("pageView"); + String collectionQuantity = (String)requestData.get("collectionQuantity"); + dynamicData.setTitle(title); + requestData.remove("title"); + dynamicData.setPageView(pageView); + requestData.remove("pageView"); + dynamicData.setCollectionQuantity(collectionQuantity); + requestData.remove("collectionQuantity"); + ArrayList inputarr = (ArrayList)requestData.get("inputarr"); + for (String s : inputarr) { + requestData.put(s,null); + } + requestData.remove("inputarr"); + dynamicData.setCreatePeople(getLoginUserId(httpServletRequest).toString()); + LocalDate currentDate = LocalDate.now(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + String formattedDate = currentDate.format(formatter); + dynamicData.setCreateTime(formattedDate); + dynamicData.setData(requestData); + dynamicData.setTenantName(httpServletRequest.getHeader("Tenant")); + return dynamicDataRepository.save(dynamicData);//插入dynamicData数据 + } + + //查询全部数据 + public List doSelectDynamicData(HttpServletRequest httpServletRequest){ + //查询对应租户下的卡片列表数据 + List dynamicData = dynamicDataRepository.findByTenantName(httpServletRequest.getHeader("Tenant")); + for (DynamicData dynamicDatum : dynamicData) { + //查询对应卡片链接采集到数据的数量 + Long count = dynamicFormRepository.countAllByDynamicDataId(dynamicDatum.getId()); + dynamicDatum.setCollectionQuantity(count+""); + } + return dynamicData; + } + + //根据id查询数据 + public DynamicData doSelectDynamicDataById(String id){ + ObjectId objectId = new ObjectId(id); + DynamicData dynamicData = dynamicDataRepository.doFindById(objectId); + dynamicData.setPageView(Long.parseLong(dynamicData.getPageView())+1+""); + return dynamicDataRepository.save(dynamicData); + } + +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/dynamic/DynamicFormService.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/dynamic/DynamicFormService.java new file mode 100644 index 0000000..aacd879 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/dynamic/DynamicFormService.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.promotion.service.dynamic; + +import cn.iocoder.yudao.module.promotion.dal.dataobject.dynamic.DynamicForm; +import cn.iocoder.yudao.module.promotion.dal.mysql.repository.DynamicFormRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Service +public class DynamicFormService { + @Autowired + private DynamicFormRepository dynamicFormRepository; + + //查询对应卡片采集数据的数量 + public Long findDynamicFormToCount(String id){ + return dynamicFormRepository.countAllByDynamicDataId(id); + } + + //采集数据 + public void doCollectData(DynamicForm dynamicForm){ + dynamicFormRepository.save(dynamicForm); + } + + //根据卡片id查询对应采集数据的列表 + public ArrayList doCollectDataList(String id){ + List dynamicForms = dynamicFormRepository.findByDynamicDataId(id); + ArrayList list = new ArrayList<>(); + for (DynamicForm dynamicForm : dynamicForms) { + list.add(dynamicForm.getMap()); + } + return list; + } + +} diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/AppDeliverExpressController.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/AppDeliverExpressController.java index 540f5b6..fc88fe5 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/AppDeliverExpressController.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/AppDeliverExpressController.java @@ -14,12 +14,15 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import javax.annotation.security.PermitAll; import java.util.Comparator; import java.util.List; +import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -40,11 +43,18 @@ public class AppDeliverExpressController { return success(DeliveryExpressConvert.INSTANCE.convertList03(list)); } - @GetMapping("/realTimeExpressDeliveryQuery") + @PostMapping("/realTimeExpressDeliveryQuery") @Operation(summary = "实时物流查询") public CommonResult realTimeExpressDeliveryQuery(){ String deliveryQuery = deliveryExpressService.deliveryQuery(); return success(deliveryQuery); } + @PostMapping("/electronicFaceSheet") + @Operation(summary = "电子面单下单") + public CommonResult electronicFaceSheetOrder(){ + String sheetOrder = deliveryExpressService.doElectronicFaceSheetOrder(); + return success(sheetOrder); + } + } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/ElectronicFaceSheet.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/ElectronicFaceSheet.java new file mode 100644 index 0000000..4391be5 --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/ElectronicFaceSheet.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.trade.controller.app.delivery.vo.express; + +import lombok.Data; + +@Data +public class ElectronicFaceSheet { + private String method;//业务类型(默认:order) + private String key;//授权码,请到快递100页面申请企业版接口获取 + private String sign;//32位大写,签名,用于验证身份,按MD5 (param +t+key+ secret)的顺序进行MD5加密,不需要加上“+”号,secret在企业管理后台获取 + private String t;//时间戳如:1576123932000 + private ElectronicFaceSheetParam param;// 由其他字段拼接 +} diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/ElectronicFaceSheetParam.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/ElectronicFaceSheetParam.java new file mode 100644 index 0000000..622e304 --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/ElectronicFaceSheetParam.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.trade.controller.app.delivery.vo.express; + +import lombok.Data; + +@Data +public class ElectronicFaceSheetParam { + private String printType;//打印类型,NON:只下单不打印(默认); IMAGE:生成图片短链;HTML:生成html短链; CLOUD:使用快递100云打印机打印,使用CLOUD时siid必填 + private String partnerId;// 电子面单客户账户或月结账号,需贵司向当地快递公司网点申请(参考电子面单申请指南); 是否必填该属性,请查看参数字典 + private String partnerKey;//电子面单密码,需贵司向当地快递公司网点申请; 是否必填该属性,请查看参数字典 + private String partnerSecret;//电子面单密钥,需贵司向当地快递公司网点申请; 是否必填该属性,请查看参数字典 + private String partnerName;// 电子面单客户账户名称,需贵司向当地快递公司网点申请; 是否必填该属性,请查看参数字典 + private String net;//收件网点名称,由快递公司当地网点分配, 若使用淘宝授权填入(taobao),使用菜鸟授权填入(cainiao), 使用京东授权填入(jdalpha),使用拼多多授权填入(pinduoduoWx),使用抖音授权填入(douyin),使用快手授权填入(kuaishou),使用唯品会授权填入(weipinhui),使用视频号授权填入(wechatChannels),使用小红书授权填入(xiaohongshu)。 是否必填该属性,请查看参数字典 (若通过第三方授权方式获取单号partnerId,partnerKey参数为必填,参数值可通过第三方授权接口获取) + private String code;//电子面单承载编号,需贵司向当地快递公司网点申请; 是否必填该属性,请查看参数字典 + private String checkMan;//电子面单承载快递员名,需贵司向当地快递公司网点申请; 是否必填该属性,请查看参数字典 + private String tbNet;// 在使用菜鸟/淘宝/拼多多授权电子面单时,若月结账号下存在多个网点,则tbNet="网点名称,网点编号" ,注意此处为英文逗号 + private String kuaidicom;//快递公司的编码,一律用小写字母,请查看参数字典 + private RecManVo recMan;//收件人信息 + private SendManVo sendMan;//寄件人信息 + private String cargo;//物品名称,例:文件 + private Integer count;//包裹总数量。该属性与子单有关,如果需要子单(指同一个订单打印出多张电子面单,即同一个订单返回多个面单号),needChild = 1、count 需要大于1,如count = 2 则一个主单 一个子单,count = 3则一个主单 二个子单;返回的子单号码见返回结果的childNum字段 + private Double weight;//物品总重量KG,例:1.5,单位kg。极兔速递必填,其他快递公司非必填 + private String payType;//支付方式: SHIPPER:寄方付(默认) CONSIGNEE:到付 MONTHLY:月结 THIRDPARTY:第三方支付 (详细请查看参数字典 ) + private String expType;//产品类型: 如标准快递(默认) 顺丰标快(陆运) EMS经济 (详细请请查看参数字典 ) + private String remark;//备注 + private String siid;//打印设备,通过打印机输出的设备码进行获取,printType为CLOUD时必填 + private String direction;//打印方向, 0:正方向(默认); 1:反方向;只有printType为CLOUD时该参数生效 + private String tempId;//主单模板,通过管理后台的快递公司模板V2信息获取 + private String childTempId;//子单模板,部分快递公司需指定。通过管理后台的快递公司模板V2信息获取 + private String backTempId;//回单模板,部分快递公司需指定。通过管理后台的快递公司模板V2信息获取 +} diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/RecManVo.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/RecManVo.java new file mode 100644 index 0000000..0cc1011 --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/RecManVo.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.trade.controller.app.delivery.vo.express; + +import lombok.Data; + +@Data +public class RecManVo { + private String name; + private String mobile; + private String tel; + private String printAddr; + private String company; +} diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/SendManVo.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/SendManVo.java new file mode 100644 index 0000000..521b25f --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/delivery/vo/express/SendManVo.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.trade.controller.app.delivery.vo.express; + +import lombok.Data; + +@Data +public class SendManVo { + private String name; + private String mobile; + private String tel; + private String printAddr; + private String company; +} diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressService.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressService.java index f8722fc..910f392 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressService.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressService.java @@ -82,4 +82,6 @@ public interface DeliveryExpressService { String deliveryQuery(); + String doElectronicFaceSheetOrder(); + } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressServiceImpl.java index b768357..2e4775d 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/delivery/DeliveryExpressServiceImpl.java @@ -9,6 +9,8 @@ import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.Delive import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.DeliveryExpressExportReqVO; import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.DeliveryExpressPageReqVO; import cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express.DeliveryExpressUpdateReqVO; +import cn.iocoder.yudao.module.trade.controller.app.delivery.vo.express.ElectronicFaceSheet; +import cn.iocoder.yudao.module.trade.controller.app.delivery.vo.express.ElectronicFaceSheetParam; import cn.iocoder.yudao.module.trade.convert.delivery.DeliveryExpressConvert; import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO; import cn.iocoder.yudao.module.trade.dal.mysql.delivery.DeliveryExpressMapper; @@ -170,4 +172,23 @@ public class DeliveryExpressServiceImpl implements DeliveryExpressService { return postSec.body(); } + @Override + public String doElectronicFaceSheetOrder() { + //快递100 电子面单下单api接口地址 + String url = "https://api.kuaidi100.com/label/order"; + ElectronicFaceSheet faceSheet = new ElectronicFaceSheet(); + faceSheet.setKey(""); + faceSheet.setMethod("order"); + faceSheet.setSign(""); + ElectronicFaceSheetParam sheetParam = new ElectronicFaceSheetParam(); + sheetParam.setPrintType("NON"); + sheetParam.setPartnerId(""); + faceSheet.setParam(sheetParam); + HttpResponse postSec = HttpUtil.createPost(url) + .header("Content-Type","application/x-www-form-urlencoded") + .body(faceSheet.toString()) + .execute(); + return postSec.body(); + } + } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/test/java/cn/iocoder/yudao/module/trade/doTest/DoKDTest.java b/yudao-module-mall/yudao-module-trade-biz/src/test/java/cn/iocoder/yudao/module/trade/doTest/DoKDTest.java new file mode 100644 index 0000000..2248189 --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/test/java/cn/iocoder/yudao/module/trade/doTest/DoKDTest.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.trade.doTest; + +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpUtil; +import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; + +@Slf4j +public class DoKDTest { + + @Test + public void test(){ + String url = "http://127.0.0.1:6127/admin-api/trade/delivery/express-template/doTest"; + DeliveryExpressDO expressDO = new DeliveryExpressDO(); + expressDO.setCode("134435"); + expressDO.setLogo("scsdc"); + expressDO.setName("jjjj"); + HttpResponse postSec = HttpUtil.createPost(url) + .header("Content-Type","application/x-www-form-urlencoded") + .header("tenant-id","1") + .body(expressDO.toString()) + .execute(); + System.out.println(postSec.body()); + } +} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java index a51b875..79262d0 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -29,6 +30,7 @@ public class PayOrderDO extends BaseDO { /** * 订单编号,数据库自增 */ + @TableId private Long id; /** * 应用编号 diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java index 2de531c..ba479b2 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java @@ -47,7 +47,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { /** * TODO 芋艿:放到 payconfig */ - private static final Long WALLET_PAY_APP_ID = 8L; + private static final Long WALLET_PAY_APP_ID = 1L; private static final String WALLET_RECHARGE_ORDER_SUBJECT = "钱包余额充值"; @@ -84,7 +84,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { // 2.1 创建支付单 Long payOrderId = payOrderService.createOrder(new PayOrderCreateReqDTO() .setAppId(WALLET_PAY_APP_ID).setUserIp(userIp) - .setMerchantOrderId(recharge.getId().toString()) // 业务的订单编号 + .setMerchantOrderId(""+recharge.getId()) // 业务的订单编号 .setSubject(WALLET_RECHARGE_ORDER_SUBJECT).setBody("") .setPrice(recharge.getPayPrice()) .setExpireTime(addTime(Duration.ofHours(2L)))); // TODO @芋艿:支付超时时间 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/WarningJob.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/WarningJob.java index 2ea06ca..dcce679 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/WarningJob.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/job/WarningJob.java @@ -82,7 +82,7 @@ public class WarningJob implements JobHandler { OperateWarningDO spaceWarningDO = new OperateWarningDO(); spaceWarningDO.setAlarmPolicy("磁盘告警策略"); spaceWarningDO.setMonitoringObject("磁盘"); - spaceWarningDO.setTriggeringCondition("当磁盘占用率达到"+Double.parseDouble(configCountProcessCPUDo.getLabel())*100+"%"); + spaceWarningDO.setTriggeringCondition("当磁盘占用率达到"+Double.parseDouble(configCountDo.getLabel())*100+"%"); operateWarningMapper.insert(spaceWarningDO); } } catch (Exception e) { diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 46fdb48..d90e6e6 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -47,7 +47,7 @@ spring: datasource: master: name: ruoyi-vue-pro - url: jdbc:mysql://120.46.37.243:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + url: jdbc:mysql://1.14.205.126:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例 @@ -73,7 +73,8 @@ spring: # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: 120.46.37.243 # 地址 + host: 1.14.205.126 # 地址 +# host: 120.46.37.243 # 地址 # host: 124.70.1.134 # 地址 # host: 127.0.0.1 # 地址 port: 6379 # 端口 @@ -256,3 +257,12 @@ justauth: prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟 +spring: + data: + mongodb: + uri: mongodb://root:123456@120.46.37.243:27017/admin?authMechanism=SCRAM-SHA-256 + # uri: mongodb://root:123456@101.43.112.107:27017/admin?authMechanism=SCRAM-SHA-256 + database: zy-crm + + +
{{o.pageView}}
{{o.collectionQuantity}}