diff --git a/box-bps/pom.xml b/box-bps/pom.xml new file mode 100644 index 000000000..729e8ff11 --- /dev/null +++ b/box-bps/pom.xml @@ -0,0 +1,47 @@ + + + + ruoyi + com.ruoyi + 4.6.1 + + 4.0.0 + + box-bps + + + bps系统模块 + + + + + + + com.ruoyi + ruoyi-common + + + + org.json + json + 20160810 + + + + io.swagger + swagger-annotations + 1.5.21 + compile + + + + com.github.kuaidi100-api + sdk + 1.0.2 + + + + + \ No newline at end of file diff --git a/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushApiController.java b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushApiController.java new file mode 100644 index 000000000..02e7cc63e --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushApiController.java @@ -0,0 +1,46 @@ +package com.ruoyi.bps.controller; + +import com.kuaidi100.sdk.response.SubscribeResp; +import com.ruoyi.bps.domain.ExpSubscribe; +import com.ruoyi.bps.service.IExpSubsPushApiService; +import com.ruoyi.common.core.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; + +/** + * 接受快递推送信息的API接口Controller + * + * @author box + * @date 2021-05-13 + */ +@Api("快递信息订阅推送") +@RestController +@RequestMapping("/anon") +public class ExpSubsPushApiController extends BaseController { + @Autowired + IExpSubsPushApiService expSubsPushApiService; + + //推送 + @CrossOrigin + @PostMapping("/subscribeCallBackUrl") + @ApiOperation("快递信息订阅推送接受") + public SubscribeResp SubscribeCallBackUrl(HttpServletRequest request) { + return expSubsPushApiService.ExpressSubscribeCallBackUrl(request); + } + + //订阅 + @CrossOrigin + @PostMapping("/subscribe") + public SubscribeResp Subscribe(ExpSubscribe expSubscribe){ + return expSubsPushApiService.ExpressSubscribe(expSubscribe); + } + +} + diff --git a/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushRespController.java b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushRespController.java new file mode 100644 index 000000000..3b8792816 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubsPushRespController.java @@ -0,0 +1,123 @@ +package com.ruoyi.bps.controller; + +import com.ruoyi.bps.domain.ExpSubsPushResp; +import com.ruoyi.bps.service.IExpSubsPushRespService; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 快递订阅推送信息增删改查Controller + * + * @author box + * @date 2021-05-13 + */ +@Controller +@RequestMapping("/bps/expsubspushresp") +public class ExpSubsPushRespController extends BaseController +{ + private String prefix = "bps/expsubspushresp"; + + @Autowired + private IExpSubsPushRespService expSubsPushRespService; + + @RequiresPermissions("bps:expsubspushresp:view") + @GetMapping() + public String expsubspushresp() + { + return prefix + "/expsubspushresp"; + } + + /** + * 查询快递订阅推送信息列表 + */ + @RequiresPermissions("bps:expsubspushresp:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(ExpSubsPushResp expSubsPushResp) + { + startPage(); + List list = expSubsPushRespService.selectExpSubsPushRespList(expSubsPushResp); + return getDataTable(list); + } + + /** + * 导出快递订阅推送信息列表 + */ + @RequiresPermissions("bps:expsubspushresp:export") + @Log(title = "快递订阅推送信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(ExpSubsPushResp expSubsPushResp) + { + List list = expSubsPushRespService.selectExpSubsPushRespList(expSubsPushResp); + ExcelUtil util = new ExcelUtil(ExpSubsPushResp.class); + return util.exportExcel(list, "快递订阅推送信息数据"); + } + + /** + * 新增快递订阅推送信息 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存快递订阅推送信息 + */ + @RequiresPermissions("bps:expsubspushresp:add") + @Log(title = "快递订阅推送信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(ExpSubsPushResp expSubsPushResp) + { + return toAjax(expSubsPushRespService.insertExpSubsPushResp(expSubsPushResp)); + } + + /** + * 修改快递订阅推送信息 + */ + @GetMapping("/edit/{sid}") + public String edit(@PathVariable("sid") Long sid, ModelMap mmap) + { + ExpSubsPushResp expSubsPushResp = expSubsPushRespService.selectExpSubsPushRespById(sid); + mmap.put("expSubsPushResp", expSubsPushResp); + return prefix + "/edit"; + } + + /** + * 修改保存快递订阅推送信息 + */ + @RequiresPermissions("bps:expsubspushresp:edit") + @Log(title = "快递订阅推送信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(ExpSubsPushResp expSubsPushResp) + { + return toAjax(expSubsPushRespService.updateExpSubsPushResp(expSubsPushResp)); + } + + /** + * 删除快递订阅推送信息 + */ + @RequiresPermissions("bps:expsubspushresp:remove") + @Log(title = "快递订阅推送信息", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(expSubsPushRespService.deleteExpSubsPushRespByIds(ids)); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubscribeController.java b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubscribeController.java new file mode 100644 index 000000000..7ff195311 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpSubscribeController.java @@ -0,0 +1,139 @@ +package com.ruoyi.bps.controller; + +import com.ruoyi.bps.domain.ExpSubscribe; +import com.ruoyi.bps.service.IExpSubsPushApiService; +import com.ruoyi.bps.service.IExpSubscribeService; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.kuaidi100.sdk.response.SubscribeResp; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 快递订阅Controller + * + * @author box + * @date 2021-05-20 + */ +@Controller +@RequestMapping("/bps/subscribe") +public class ExpSubscribeController extends BaseController +{ + private String prefix = "bps/subscribe"; + + @Autowired + private IExpSubscribeService expSubscribeService; + + @Autowired + private IExpSubsPushApiService iExpSubsPushApiService; + + @RequiresPermissions("bps:subscribe:view") + @GetMapping() + public String subscribe() + { + return prefix + "/subscribe"; + } + + /** + * 订阅快递 + */ + @CrossOrigin + @RequestMapping("/subscribe") + @ResponseBody + public SubscribeResp ExpressSubscribe(@RequestBody ExpSubscribe expSubscribe) { + return iExpSubsPushApiService.ExpressSubscribe(expSubscribe); + } + + + /** + * 查询快递订阅列表 + */ + @RequiresPermissions("bps:subscribe:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(ExpSubscribe expSubscribe) + { + startPage(); + List list = expSubscribeService.selectExpSubscribeList(expSubscribe); + return getDataTable(list); + } + + /** + * 导出快递订阅列表 + */ + @RequiresPermissions("bps:subscribe:export") + @Log(title = "快递订阅", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(ExpSubscribe expSubscribe) + { + List list = expSubscribeService.selectExpSubscribeList(expSubscribe); + ExcelUtil util = new ExcelUtil(ExpSubscribe.class); + return util.exportExcel(list, "快递订阅数据"); + } + + /** + * 新增快递订阅 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存快递订阅 + */ + @RequiresPermissions("bps:subscribe:add") + @Log(title = "快递订阅", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(ExpSubscribe expSubscribe) + { + return toAjax(expSubscribeService.insertExpSubscribe(expSubscribe)); + } + + /** + * 修改快递订阅 + */ + @GetMapping("/edit/{sid}") + public String edit(@PathVariable("sid") Long sid, ModelMap mmap) + { + ExpSubscribe expSubscribe = expSubscribeService.selectExpSubscribeById(sid); + mmap.put("expSubscribe", expSubscribe); + return prefix + "/edit"; + } + + /** + * 修改保存快递订阅 + */ + @RequiresPermissions("bps:subscribe:edit") + @Log(title = "快递订阅", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(ExpSubscribe expSubscribe) + { + return toAjax(expSubscribeService.updateExpSubscribe(expSubscribe)); + } + + /** + * 删除快递订阅 + */ + @RequiresPermissions("bps:subscribe:remove") + @Log(title = "快递订阅", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(expSubscribeService.deleteExpSubscribeByIds(ids)); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/controller/ExpressInfoController.java b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpressInfoController.java new file mode 100644 index 000000000..ae09c6b0b --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpressInfoController.java @@ -0,0 +1,124 @@ +package com.ruoyi.bps.controller; + +import com.ruoyi.bps.domain.ExpressInfo; +import com.ruoyi.bps.service.IExpressInfoService; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.controller.BaseController; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 快递信息Controller + * + * @author box + * @date 2021-05-06 + */ +@Controller +@RequestMapping("/bps/expressInfo") +public class ExpressInfoController extends BaseController +{ + private String prefix = "bps/expressInfo"; + + @Autowired + private IExpressInfoService expressInfoService; + + @RequiresPermissions("bps:expressInfo:view") + @GetMapping() + public String expressInfo() + { + return prefix + "/expressInfo"; + } + + /** + * 查询快递信息列表 + */ + @RequiresPermissions("bps:expressInfo:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(ExpressInfo expressInfo) + { + startPage(); + List list = expressInfoService.selectExpressInfoList(expressInfo); + return getDataTable(list); + } + + /** + * 导出快递信息列表 + */ + @RequiresPermissions("bps:expressInfo:export") + @Log(title = "快递信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(ExpressInfo expressInfo) + { + List list = expressInfoService.selectExpressInfoList(expressInfo); + ExcelUtil util = new ExcelUtil(ExpressInfo.class); + return util.exportExcel(list, "快递信息数据"); + } + + /** + * 新增快递信息 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存快递信息 + */ + @RequiresPermissions("bps:expressInfo:add") + @Log(title = "快递信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(ExpressInfo expressInfo) + { + return toAjax(expressInfoService.insertExpressInfo(expressInfo)); + } + + /** + * 修改快递信息 + */ + @GetMapping("/edit/{message}") + public String edit(@PathVariable("message") String message, ModelMap mmap) + { + ExpressInfo expressInfo = expressInfoService.selectExpressInfoById(message); + mmap.put("expressInfo", expressInfo); + return prefix + "/edit"; + } + + /** + * 修改保存快递信息 + */ + @RequiresPermissions("bps:expressInfo:edit") + @Log(title = "快递信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(ExpressInfo expressInfo) + { + return toAjax(expressInfoService.updateExpressInfo(expressInfo)); + } + + /** + * 删除快递信息 + */ + @RequiresPermissions("bps:expressInfo:remove") + @Log(title = "快递信息", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(expressInfoService.deleteExpressInfoByIds(ids)); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/controller/ExpressTestController.java b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpressTestController.java new file mode 100644 index 000000000..c248bc8e6 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/controller/ExpressTestController.java @@ -0,0 +1,50 @@ +package com.ruoyi.bps.controller; + + +//import com.ruoyi.bps.express.contant.CompanyConstant; +//import com.ruoyi.bps.express.request.QueryTrackParam; + +import com.ruoyi.bps.service.IExpressService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.page.TableDataInfo; +import com.kuaidi100.sdk.request.QueryTrackParam; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class ExpressTestController extends BaseController { + @Autowired + private IExpressService expressService; + + @RequestMapping("/anon/bps/express/test/queryTrackMultiList") + public TableDataInfo QueryTrackMultiList(){ + //return expressService.QueryTrackExpressMultiList(expressService.GetTestQueryTrackParam()).toString(); + return getDataTable(expressService.QueryTrackExpressMultiList(expressService.GetTestQueryTrackParam())); + } + + @RequestMapping("/anon/bps/express/test/queryTrackMulti") + public String QueryTrackMulti(){ + return expressService.QueryTrackExpressMulti(expressService.GetTestQueryTrackParam()); + } + + @RequestMapping("/anon/bps/express/test/queryTrack") + public String QueryTrack(){ + QueryTrackParam queryTrackParam = new QueryTrackParam(); + queryTrackParam.setCom("annengwuliu"); + queryTrackParam.setNum("3004459671351"); + queryTrackParam.setPhone("17725390266"); + + return expressService.QueryTrackExpress(queryTrackParam); + + + } + @RequestMapping("/anon/bps/express/test/subscribe") + public String Subscribe(){ + return expressService.SubscribeExpress(); + } + + + + +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/controller/FrForCrTopgpController.java b/box-bps/src/main/java/com/ruoyi/bps/controller/FrForCrTopgpController.java new file mode 100644 index 000000000..c0d8f02a3 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/controller/FrForCrTopgpController.java @@ -0,0 +1,102 @@ +package com.ruoyi.bps.controller; + +import com.ruoyi.bps.service.TopgpDdlService; +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.common.utils.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +@RestController +public class FrForCrTopgpController { + @Autowired + private TopgpDdlService topgpDdlService; + + //访问 ../anon/bps/frforcr/topprod时,使用topprod + @CrossOrigin + @Log(title = "CSFR412_CR报表_TOPPROD", businessType = BusinessType.DROP) + @RequestMapping("/anon/bps/frforcr/topprod") + @DataSource(value = DataSourceType.TOPPRODDSREPORT) + public AjaxResult frforcrtopprod(@RequestBody Map map){ + return frforcrtoppgp(map); + } + + //访问../anon/bps/frforcr/topprod时,使用toptest实例 + @CrossOrigin + @Log(title = "CSFR412_CR报表_TOPTEST", businessType = BusinessType.DROP) + @RequestMapping("/anon/bps/frforcr/toptest") + @DataSource(value = DataSourceType.TOPTESTDSREPORT) + public AjaxResult frforcrtoptest(@RequestBody Map map){ + return frforcrtoppgp(map); + } + + private AjaxResult frforcrtoppgp(Map map){ + /* 多此一举,在@RequestBody时取不到值是,已经会报500错误了,并不会执行到这一段。 + if(map.isEmpty()){ //如果传过来的值为空,返回未取到表名 + // System.out.println(LocalTime.now()+"未获取到表名!"); + return AjaxResult.error("未取到表名传参!"); + } + */ + StringBuilder droppedTable = new StringBuilder(); + StringBuilder errorDroppedTable = new StringBuilder(); + StringBuilder notExistsTable = new StringBuilder(); + + for (String tableName : getTableName(map)) { + if(topgpDdlService.isTableInDb("ds_report",tableName) <=0){ + //表名在数据库中不存在 + //System.out.println(LocalTime.now() + "【" + tableName + "】不存在!"); + notExistsTable.append(tableName+","); + continue; + } + + try { + topgpDdlService.dropTable("ds_report." + tableName); + //System.out.println(LocalTime.now() + "【" + tableName + "】已被删除!"); + droppedTable.append(tableName+","); + } catch (Exception e) { + //System.out.println(LocalTime.now() + "【" + tableName + "】删除异常!"); + errorDroppedTable.append(tableName+","); + } + } + + //删除异常写入日志 + if (StringUtils.isNotEmpty(errorDroppedTable)){ + return AjaxResult.error(errorDroppedTable+"删除异常!"); + } + //表不存在写入日志 + if(StringUtils.isNotEmpty(notExistsTable)){ + return AjaxResult.warn(notExistsTable+"表不存在!"); + } + //被删除的表写入日志 + if(StringUtils.isNotEmpty(droppedTable)){ + return AjaxResult.success(droppedTable + "删除成功!"); + } + //以上三种情况都不存在,说明发生了不明异常,写入日志 + return AjaxResult.warn("发生不明异常!"); + } + + //防止意手抖把SID也当成表传过来 + //排除sid的key值 + private List getTableName(Map map){ + List list=new ArrayList(); + for(String key:map.keySet()){ + if(key !="sid") + { + list.add(map.get(key).toString()); + } + } + return list; + } +} + + diff --git a/box-bps/src/main/java/com/ruoyi/bps/controller/QueryExpressController.java b/box-bps/src/main/java/com/ruoyi/bps/controller/QueryExpressController.java new file mode 100644 index 000000000..faa2d2510 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/controller/QueryExpressController.java @@ -0,0 +1,103 @@ +package com.ruoyi.bps.controller; + + +//import com.ruoyi.bps.express.contant.CompanyConstant; +//import com.ruoyi.bps.express.request.QueryTrackParam; +//import com.ruoyi.bps.express.response.QueryTrackResp; + +import com.ruoyi.bps.service.IExpressService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.page.TableDataInfo; +import com.google.gson.Gson; +import com.kuaidi100.sdk.request.QueryTrackParam; +import com.kuaidi100.sdk.response.QueryTrackResp; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.HashMap; +import java.util.Map; + +@Controller +public class QueryExpressController extends BaseController { + @Autowired + private IExpressService expressService; + @RequiresPermissions("bps:express:view") + @RequestMapping("/bps/express/queryExpress") + public String queryExpress() + { + //return "express/queryExpress"; + //说明:此处不能用绝对路径,否则,当application.yml中,设定context-path: /it_war后,打Jar包时,会找不到thymeleaf对应的文件。 + return "express/queryExpress"; + } + + @CrossOrigin + @RequestMapping("/bps/express/queryExpress/list") + @ResponseBody + public Map queryExpressList(@RequestBody QueryTrackParam queryTrackParam){ + Map result = null; + if (queryTrackParam != null) { + System.out.println("运单号码:" + queryTrackParam.getNum()); + System.out.println("快递公司:" + queryTrackParam.getCom()); + System.out.println("电话:" + queryTrackParam.getPhone()); + result = new HashMap<>(); + result.put("code", "1"); + result.put("msg", "ok"); + result.put("info",expressService.QueryTrackExpress(queryTrackParam)); + } + return result; + } + + @CrossOrigin + @RequestMapping("/bps/express/queryExpress/list1") + @ResponseBody + public Map queryExpressList1(@RequestBody QueryTrackParam queryTrackParam){ + Map result = null; + if (queryTrackParam != null) { + System.out.println("运单号码:" + queryTrackParam.getNum()); + System.out.println("快递公司:" + queryTrackParam.getCom()); + System.out.println("电话:" + queryTrackParam.getPhone()); + String info=expressService.QueryTrackExpress(queryTrackParam); + QueryTrackResp queryTrackResp = new Gson().fromJson(info,QueryTrackResp.class); + result = new HashMap<>(); + result.put("code", "1"); + result.put("msg", "ok"); + result.put("nu",queryTrackResp.getNu()); + result.put("com",queryTrackResp.getCom()); + result.put("state",queryTrackResp.getState()); + result.put("info",queryTrackResp.getData()); + } + return result; + } + + @RequestMapping("/anon/bps/express/queryTrackMultiList") + public TableDataInfo QueryTrackMultiList(@RequestBody QueryTrackParam queryTrackParam){ + + return getDataTable(expressService.QueryTrackExpressMultiList(expressService.GetTestQueryTrackParam())); + } + + @RequestMapping("/anon/bps/express/queryTrackMulti") + public String QueryTrackMulti(){ + return expressService.QueryTrackExpressMulti(expressService.GetTestQueryTrackParam()); + } + + @RequestMapping("/anon/bps/express/queryTrack") + public String QueryTrack(){ + QueryTrackParam queryTrackParam = new QueryTrackParam(); + queryTrackParam.setCom("annengwuliu"); + queryTrackParam.setNum("3004459671351"); + queryTrackParam.setPhone("17725390266"); + + return expressService.QueryTrackExpress(queryTrackParam); + + + } + @RequestMapping("/anon/bps/express/subscribe") + public String Subscribe(){ + return expressService.SubscribeExpress(); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/domain/ExpSubsPushResp.java b/box-bps/src/main/java/com/ruoyi/bps/domain/ExpSubsPushResp.java new file mode 100644 index 000000000..d9e9a4fcc --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/domain/ExpSubsPushResp.java @@ -0,0 +1,345 @@ +package com.ruoyi.bps.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 快递订阅推送信息对象 exp_subs_push_resp + * + * @author box + * @date 2021-05-13 + */ +public class ExpSubsPushResp extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** SID */ + private Long sid; + + /** 监控状态 */ + @Excel(name = "监控状态") + private String status; + + /** 状态 */ + @Excel(name = "状态") + private String billStatus; + + /** 监控状态消息 */ + @Excel(name = "监控状态消息") + private String message; + + /** 快递公司编码是否出错 */ + @Excel(name = "快递公司编码是否出错") + private String autoCheck; + + /** 原始快递公司编码 */ + @Excel(name = "原始快递公司编码") + private String comOld; + + /** 修正快递公司编码 */ + @Excel(name = "修正快递公司编码") + private String comNew; + + /** 当前快递消息 */ + @Excel(name = "当前快递消息") + private String lastResultMessage; + + /** 当前快递单状态 */ + @Excel(name = "当前快递单状态") + private String lastResultState; + + /** 通讯状态 */ + @Excel(name = "通讯状态") + private String lastResulStatus; + + /** 快递单明细状态 */ + @Excel(name = "快递单明细状态") + private String lastResultCondition; + + /** 是否签收 */ + @Excel(name = "是否签收") + private String lastResultIsCheck; + + /** 快递公司编码 */ + @Excel(name = "快递公司编码") + private String lastResultCom; + + /** 快递单号 */ + @Excel(name = "快递单号") + private String lastResultNu; + + /** 快递流转信息 */ + @Excel(name = "快递流转信息") + private String lastResultData; + + /** 目的国快递消息 */ + @Excel(name = "目的国快递消息") + private String destResultMessage; + + /** 目的国快递单状态 */ + @Excel(name = "目的国快递单状态") + private String destResultState; + + /** 目的国通讯状态 */ + @Excel(name = "目的国通讯状态") + private String destResultStatus; + + /** 目的国快递单明细状态 */ + @Excel(name = "目的国快递单明细状态") + private String destResultCondition; + + /** 目的国是否签收 */ + @Excel(name = "目的国是否签收") + private String destResultIsCheck; + + /** 目的国快递公司编码 */ + @Excel(name = "目的国快递公司编码") + private String destResultCom; + + /** 目的国快递单号 */ + @Excel(name = "目的国快递单号") + private String destResultNu; + + /** 目的国快递流转信息 */ + @Excel(name = "目的国快递流转信息") + private String destResultData; + + public void setSid(Long sid) + { + this.sid = sid; + } + + public Long getSid() + { + return sid; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setBillStatus(String billStatus) + { + this.billStatus = billStatus; + } + + public String getBillStatus() + { + return billStatus; + } + public void setMessage(String message) + { + this.message = message; + } + + public String getMessage() + { + return message; + } + public void setAutoCheck(String autoCheck) + { + this.autoCheck = autoCheck; + } + + public String getAutoCheck() + { + return autoCheck; + } + public void setComOld(String comOld) + { + this.comOld = comOld; + } + + public String getComOld() + { + return comOld; + } + public void setComNew(String comNew) + { + this.comNew = comNew; + } + + public String getComNew() + { + return comNew; + } + public void setLastResultMessage(String lastResultMessage) + { + this.lastResultMessage = lastResultMessage; + } + + public String getLastResultMessage() + { + return lastResultMessage; + } + public void setLastResultState(String lastResultState) + { + this.lastResultState = lastResultState; + } + + public String getLastResultState() + { + return lastResultState; + } + public void setLastResulStatus(String lastResulStatus) + { + this.lastResulStatus = lastResulStatus; + } + + public String getLastResulStatus() + { + return lastResulStatus; + } + public void setLastResultCondition(String lastResultCondition) + { + this.lastResultCondition = lastResultCondition; + } + + public String getLastResultCondition() + { + return lastResultCondition; + } + public void setLastResultIsCheck(String lastResultIsCheck) + { + this.lastResultIsCheck = lastResultIsCheck; + } + + public String getLastResultIsCheck() + { + return lastResultIsCheck; + } + public void setLastResultCom(String lastResultCom) + { + this.lastResultCom = lastResultCom; + } + + public String getLastResultCom() + { + return lastResultCom; + } + public void setLastResultNu(String lastResultNu) + { + this.lastResultNu = lastResultNu; + } + + public String getLastResultNu() + { + return lastResultNu; + } + public void setLastResultData(String lastResultData) + { + this.lastResultData = lastResultData; + } + + public String getLastResultData() + { + return lastResultData; + } + public void setDestResultMessage(String destResultMessage) + { + this.destResultMessage = destResultMessage; + } + + public String getDestResultMessage() + { + return destResultMessage; + } + public void setDestResultState(String destResultState) + { + this.destResultState = destResultState; + } + + public String getDestResultState() + { + return destResultState; + } + public void setDestResultStatus(String destResultStatus) + { + this.destResultStatus = destResultStatus; + } + + public String getDestResultStatus() + { + return destResultStatus; + } + public void setDestResultCondition(String destResultCondition) + { + this.destResultCondition = destResultCondition; + } + + public String getDestResultCondition() + { + return destResultCondition; + } + public void setDestResultIsCheck(String destResultIsCheck) + { + this.destResultIsCheck = destResultIsCheck; + } + + public String getDestResultIsCheck() + { + return destResultIsCheck; + } + public void setDestResultCom(String destResultCom) + { + this.destResultCom = destResultCom; + } + + public String getDestResultCom() + { + return destResultCom; + } + public void setDestResultNu(String destResultNu) + { + this.destResultNu = destResultNu; + } + + public String getDestResultNu() + { + return destResultNu; + } + public void setDestResultData(String destResultData) + { + this.destResultData = destResultData; + } + + public String getDestResultData() + { + return destResultData; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("sid", getSid()) + .append("status", getStatus()) + .append("billStatus", getBillStatus()) + .append("message", getMessage()) + .append("autoCheck", getAutoCheck()) + .append("comOld", getComOld()) + .append("comNew", getComNew()) + .append("lastResultMessage", getLastResultMessage()) + .append("lastResultState", getLastResultState()) + .append("lastResulStatus", getLastResulStatus()) + .append("lastResultCondition", getLastResultCondition()) + .append("lastResultIsCheck", getLastResultIsCheck()) + .append("lastResultCom", getLastResultCom()) + .append("lastResultNu", getLastResultNu()) + .append("lastResultData", getLastResultData()) + .append("destResultMessage", getDestResultMessage()) + .append("destResultState", getDestResultState()) + .append("destResultStatus", getDestResultStatus()) + .append("destResultCondition", getDestResultCondition()) + .append("destResultIsCheck", getDestResultIsCheck()) + .append("destResultCom", getDestResultCom()) + .append("destResultNu", getDestResultNu()) + .append("destResultData", getDestResultData()) + .toString(); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/domain/ExpSubscribe.java b/box-bps/src/main/java/com/ruoyi/bps/domain/ExpSubscribe.java new file mode 100644 index 000000000..2ef48209f --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/domain/ExpSubscribe.java @@ -0,0 +1,149 @@ +package com.ruoyi.bps.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 快递订阅对象 exp_subscribe + * + * @author box + * @date 2021-05-20 + */ +public class ExpSubscribe extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** SID */ + private Long sid; + + /** 快递公司编码 */ + @Excel(name = "快递公司编码") + private String company; + + /** 快递单号 */ + @Excel(name = "快递单号") + private String number; + + /** 收/寄件人电话 */ + @Excel(name = "收/寄件人电话") + private String phone; + + /** 盐 */ + @Excel(name = "盐") + private String salt; + + /** 订阅时间 */ + @Excel(name = "订阅时间") + private String subscribeTime; + + /** 订阅结果 */ + @Excel(name = "订阅结果") + private String result; + + /** 返回码 */ + @Excel(name = "返回码") + private String returnCode; + + /** 返回消息 */ + @Excel(name = "返回消息") + private String message; + + public void setSid(Long sid) + { + this.sid = sid; + } + + public Long getSid() + { + return sid; + } + public void setCompany(String company) + { + this.company = company; + } + + public String getCompany() + { + return company; + } + public void setNumber(String number) + { + this.number = number; + } + + public String getNumber() + { + return number; + } + public void setPhone(String phone) + { + this.phone = phone; + } + + public String getPhone() + { + return phone; + } + public void setSalt(String salt) + { + this.salt = salt; + } + + public String getSalt() + { + return salt; + } + public void setSubscribeTime(String subscribeTime) + { + this.subscribeTime = subscribeTime; + } + + public String getSubscribeTime() + { + return subscribeTime; + } + public void setResult(String result) + { + this.result = result; + } + + public String getResult() + { + return result; + } + public void setReturnCode(String returnCode) + { + this.returnCode = returnCode; + } + + public String getReturnCode() + { + return returnCode; + } + public void setMessage(String message) + { + this.message = message; + } + + public String getMessage() + { + return message; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("sid", getSid()) + .append("company", getCompany()) + .append("number", getNumber()) + .append("phone", getPhone()) + .append("salt", getSalt()) + .append("subscribeTime", getSubscribeTime()) + .append("result", getResult()) + .append("returnCode", getReturnCode()) + .append("message", getMessage()) + .toString(); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/domain/ExpressInfo.java b/box-bps/src/main/java/com/ruoyi/bps/domain/ExpressInfo.java new file mode 100644 index 000000000..72b2d967e --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/domain/ExpressInfo.java @@ -0,0 +1,192 @@ +package com.ruoyi.bps.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 快递信息对象 expressInfo + * + * @author box + * @date 2021-05-06 + */ +public class ExpressInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 消息 */ + @Excel(name = "消息") + private String message; + + /** 快递单号 */ + @Excel(name = "快递单号") + private String nu; + + /** 签收状态 */ + @Excel(name = "签收状态") + private String ischeck; + + /** 快递公司 */ + @Excel(name = "快递公司") + private String com; + + /** 通信状态 */ + @Excel(name = "通信状态") + private String status; + + /** 运单详情 */ + @Excel(name = "运单详情") + private String data; + + /** 当前状态 */ + @Excel(name = "当前状态") + private String state; + + /** 状态标志 */ + @Excel(name = "状态标志") + private String condition; + + /** 路由信息 */ + @Excel(name = "路由信息") + private String routeInfo; + + /** 返回码 */ + @Excel(name = "返回码") + private String returnCode; + + /** 返回结果 */ + @Excel(name = "返回结果") + private String result; + + /** 电话号码 */ + @Excel(name = "电话号码") + private String phone; + + public void setMessage(String message) + { + this.message = message; + } + + public String getMessage() + { + return message; + } + public void setNu(String nu) + { + this.nu = nu; + } + + public String getNu() + { + return nu; + } + public void setIscheck(String ischeck) + { + this.ischeck = ischeck; + } + + public String getIscheck() + { + return ischeck; + } + public void setCom(String com) + { + this.com = com; + } + + public String getCom() + { + return com; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setData(String data) + { + this.data = data; + } + + public String getData() + { + return data; + } + public void setState(String state) + { + this.state = state; + } + + public String getState() + { + return state; + } + public void setCondition(String condition) + { + this.condition = condition; + } + + public String getCondition() + { + return condition; + } + public void setRouteInfo(String routeInfo) + { + this.routeInfo = routeInfo; + } + + public String getRouteInfo() + { + return routeInfo; + } + public void setReturnCode(String returnCode) + { + this.returnCode = returnCode; + } + + public String getReturnCode() + { + return returnCode; + } + public void setResult(String result) + { + this.result = result; + } + + public String getResult() + { + return result; + } + public void setPhone(String phone) + { + this.phone = phone; + } + + public String getPhone() + { + return phone; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("message", getMessage()) + .append("nu", getNu()) + .append("ischeck", getIscheck()) + .append("com", getCom()) + .append("status", getStatus()) + .append("data", getData()) + .append("state", getState()) + .append("condition", getCondition()) + .append("routeInfo", getRouteInfo()) + .append("returnCode", getReturnCode()) + .append("result", getResult()) + .append("phone", getPhone()) + .toString(); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/mapper/ExpSubsPushRespMapper.java b/box-bps/src/main/java/com/ruoyi/bps/mapper/ExpSubsPushRespMapper.java new file mode 100644 index 000000000..f1a0bac8b --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/mapper/ExpSubsPushRespMapper.java @@ -0,0 +1,64 @@ +package com.ruoyi.bps.mapper; + +import com.ruoyi.bps.domain.ExpSubsPushResp; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +/** + * 快递订阅推送信息Mapper接口 + * + * @author box + * @date 2021-05-13 + */ +public interface ExpSubsPushRespMapper +{ + /** + * 查询快递订阅推送信息 + * + * @param sid 快递订阅推送信息ID + * @return 快递订阅推送信息 + */ + public ExpSubsPushResp selectExpSubsPushRespById(Long sid); + + /** + * 查询快递订阅推送信息列表 + * + * @param expSubsPushResp 快递订阅推送信息 + * @return 快递订阅推送信息集合 + */ + public List selectExpSubsPushRespList(ExpSubsPushResp expSubsPushResp); + + /** + * 新增快递订阅推送信息 + * + * @param expSubsPushResp 快递订阅推送信息 + * @return 结果 + */ + public int insertExpSubsPushResp(ExpSubsPushResp expSubsPushResp); + + /** + * 修改快递订阅推送信息 + * + * @param expSubsPushResp 快递订阅推送信息 + * @return 结果 + */ + public int updateExpSubsPushResp(ExpSubsPushResp expSubsPushResp); + + /** + * 删除快递订阅推送信息 + * + * @param sid 快递订阅推送信息ID + * @return 结果 + */ + public int deleteExpSubsPushRespById(Long sid); + + /** + * 批量删除快递订阅推送信息 + * + * @param sids 需要删除的数据ID + * @return 结果 + */ + public int deleteExpSubsPushRespByIds(String[] sids); +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/mapper/ExpSubscribeMapper.java b/box-bps/src/main/java/com/ruoyi/bps/mapper/ExpSubscribeMapper.java new file mode 100644 index 000000000..04a74c70c --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/mapper/ExpSubscribeMapper.java @@ -0,0 +1,64 @@ +package com.ruoyi.bps.mapper; + +import com.ruoyi.bps.domain.ExpSubscribe; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +/** + * 快递订阅Mapper接口 + * + * @author box + * @date 2021-05-20 + */ +public interface ExpSubscribeMapper +{ + /** + * 查询快递订阅 + * + * @param sid 快递订阅ID + * @return 快递订阅 + */ + public ExpSubscribe selectExpSubscribeById(Long sid); + + /** + * 查询快递订阅列表 + * + * @param expSubscribe 快递订阅 + * @return 快递订阅集合 + */ + public List selectExpSubscribeList(ExpSubscribe expSubscribe); + + /** + * 新增快递订阅 + * + * @param expSubscribe 快递订阅 + * @return 结果 + */ + public int insertExpSubscribe(ExpSubscribe expSubscribe); + + /** + * 修改快递订阅 + * + * @param expSubscribe 快递订阅 + * @return 结果 + */ + public int updateExpSubscribe(ExpSubscribe expSubscribe); + + /** + * 删除快递订阅 + * + * @param sid 快递订阅ID + * @return 结果 + */ + public int deleteExpSubscribeById(Long sid); + + /** + * 批量删除快递订阅 + * + * @param sids 需要删除的数据ID + * @return 结果 + */ + public int deleteExpSubscribeByIds(String[] sids); +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/mapper/ExpressInfoMapper.java b/box-bps/src/main/java/com/ruoyi/bps/mapper/ExpressInfoMapper.java new file mode 100644 index 000000000..4dede87d7 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/mapper/ExpressInfoMapper.java @@ -0,0 +1,64 @@ +package com.ruoyi.bps.mapper; + +import com.ruoyi.bps.domain.ExpressInfo; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +/** + * 快递信息Mapper接口 + * + * @author box + * @date 2021-05-06 + */ +public interface ExpressInfoMapper +{ + /** + * 查询快递信息 + * + * @param message 快递信息ID + * @return 快递信息 + */ + public ExpressInfo selectExpressInfoById(String message); + + /** + * 查询快递信息列表 + * + * @param expressInfo 快递信息 + * @return 快递信息集合 + */ + public List selectExpressInfoList(ExpressInfo expressInfo); + + /** + * 新增快递信息 + * + * @param expressInfo 快递信息 + * @return 结果 + */ + public int insertExpressInfo(ExpressInfo expressInfo); + + /** + * 修改快递信息 + * + * @param expressInfo 快递信息 + * @return 结果 + */ + public int updateExpressInfo(ExpressInfo expressInfo); + + /** + * 删除快递信息 + * + * @param message 快递信息ID + * @return 结果 + */ + public int deleteExpressInfoById(String message); + + /** + * 批量删除快递信息 + * + * @param messages 需要删除的数据ID + * @return 结果 + */ + public int deleteExpressInfoByIds(String[] messages); +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/mapper/TopgpDdlMapper.java b/box-bps/src/main/java/com/ruoyi/bps/mapper/TopgpDdlMapper.java new file mode 100644 index 000000000..ad06f7d89 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/mapper/TopgpDdlMapper.java @@ -0,0 +1,32 @@ +package com.ruoyi.bps.mapper; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +@Mapper +@Component("TopgpDdlMapper") +public interface TopgpDdlMapper { + // alter table + int alterTableName(@Param("originalTableName") String originalTableName, + @Param("newTableName") String newTableName); + + //truncate table + int truncateTable(@Param("tableName") String tableName); + + //drop table + int dropTable(@Param("tableName") String tableName); + + //copy table + void copyTable(@Param("newTableName") String newTableName, + @Param("originalTableName") String originalTableName); + + //获取表记录数 + int getRecordCount(@Param("tableName") String tableName); + + + + //查询数据库中表是否存在 + int isTableInDb(@Param("dataBaseName") String dataBaseName, + @Param("tableName") String tableName); +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushApiService.java b/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushApiService.java new file mode 100644 index 000000000..5867116de --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushApiService.java @@ -0,0 +1,22 @@ +package com.ruoyi.bps.service; + +import com.ruoyi.bps.domain.ExpSubscribe; +import com.kuaidi100.sdk.response.SubscribeResp; + +import javax.servlet.http.HttpServletRequest; + +public interface IExpSubsPushApiService { + public SubscribeResp ExpressSubscribe(ExpSubscribe expSubscribe); + + /** + * 快递100订阅推送处理 + * + * 回调接口支持自定义参数,比如订阅时回调地址填写的是 http://www.xxx.com?orderId=1233333 + * 可以通过下面这种方式获取到orderId: String orderId = request.getParameter("orderId"); + * + * 返回值必须是下面这样的格式,否则快递100将认为该推送失败,快递100将会重试3次该推送,时间间隔35分钟; + * 成功结果返回例子: {"result":true,"returnCode":"200","message":"提交成功"} + * + */ + public SubscribeResp ExpressSubscribeCallBackUrl(HttpServletRequest request); +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushRespService.java b/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushRespService.java new file mode 100644 index 000000000..61a6f4aba --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubsPushRespService.java @@ -0,0 +1,63 @@ +package com.ruoyi.bps.service; + +import com.ruoyi.bps.domain.ExpSubsPushResp; + +import java.util.List; + +/** + * 快递订阅推送信息Service接口 + * + * @author box + * @date 2021-05-13 + */ +public interface IExpSubsPushRespService +{ + /** + * 查询快递订阅推送信息 + * + * @param sid 快递订阅推送信息ID + * @return 快递订阅推送信息 + */ + public ExpSubsPushResp selectExpSubsPushRespById(Long sid); + + /** + * 查询快递订阅推送信息列表 + * + * @param expSubsPushResp 快递订阅推送信息 + * @return 快递订阅推送信息集合 + */ + public List selectExpSubsPushRespList(ExpSubsPushResp expSubsPushResp); + + /** + * 新增快递订阅推送信息 + * + * @param expSubsPushResp 快递订阅推送信息 + * @return 结果 + */ + public int insertExpSubsPushResp(ExpSubsPushResp expSubsPushResp); + + /** + * 修改快递订阅推送信息 + * + * @param expSubsPushResp 快递订阅推送信息 + * @return 结果 + */ + public int updateExpSubsPushResp(ExpSubsPushResp expSubsPushResp); + + /** + * 批量删除快递订阅推送信息 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteExpSubsPushRespByIds(String ids); + + /** + * 删除快递订阅推送信息信息 + * + * @param sid 快递订阅推送信息ID + * @return 结果 + */ + public int deleteExpSubsPushRespById(Long sid); + +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubscribeService.java b/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubscribeService.java new file mode 100644 index 000000000..32079053b --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/IExpSubscribeService.java @@ -0,0 +1,62 @@ +package com.ruoyi.bps.service; + +import com.ruoyi.bps.domain.ExpSubscribe; + +import java.util.List; + +/** + * 快递订阅Service接口 + * + * @author box + * @date 2021-05-20 + */ +public interface IExpSubscribeService +{ + /** + * 查询快递订阅 + * + * @param sid 快递订阅ID + * @return 快递订阅 + */ + public ExpSubscribe selectExpSubscribeById(Long sid); + + /** + * 查询快递订阅列表 + * + * @param expSubscribe 快递订阅 + * @return 快递订阅集合 + */ + public List selectExpSubscribeList(ExpSubscribe expSubscribe); + + /** + * 新增快递订阅 + * + * @param expSubscribe 快递订阅 + * @return 结果 + */ + public int insertExpSubscribe(ExpSubscribe expSubscribe); + + /** + * 修改快递订阅 + * + * @param expSubscribe 快递订阅 + * @return 结果 + */ + public int updateExpSubscribe(ExpSubscribe expSubscribe); + + /** + * 批量删除快递订阅 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteExpSubscribeByIds(String ids); + + /** + * 删除快递订阅信息 + * + * @param sid 快递订阅ID + * @return 结果 + */ + public int deleteExpSubscribeById(Long sid); +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/IExpressInfoService.java b/box-bps/src/main/java/com/ruoyi/bps/service/IExpressInfoService.java new file mode 100644 index 000000000..90c079f32 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/IExpressInfoService.java @@ -0,0 +1,62 @@ +package com.ruoyi.bps.service; + +import com.ruoyi.bps.domain.ExpressInfo; + +import java.util.List; + +/** + * 快递信息Service接口 + * + * @author box + * @date 2021-05-06 + */ +public interface IExpressInfoService +{ + /** + * 查询快递信息 + * + * @param message 快递信息ID + * @return 快递信息 + */ + public ExpressInfo selectExpressInfoById(String message); + + /** + * 查询快递信息列表 + * + * @param expressInfo 快递信息 + * @return 快递信息集合 + */ + public List selectExpressInfoList(ExpressInfo expressInfo); + + /** + * 新增快递信息 + * + * @param expressInfo 快递信息 + * @return 结果 + */ + public int insertExpressInfo(ExpressInfo expressInfo); + + /** + * 修改快递信息 + * + * @param expressInfo 快递信息 + * @return 结果 + */ + public int updateExpressInfo(ExpressInfo expressInfo); + + /** + * 批量删除快递信息 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteExpressInfoByIds(String ids); + + /** + * 删除快递信息信息 + * + * @param message 快递信息ID + * @return 结果 + */ + public int deleteExpressInfoById(String message); +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/IExpressService.java b/box-bps/src/main/java/com/ruoyi/bps/service/IExpressService.java new file mode 100644 index 000000000..b3adfa8da --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/IExpressService.java @@ -0,0 +1,33 @@ +package com.ruoyi.bps.service; + +//import com.ruoyi.bps.express.request.QueryTrackParam; +//import com.ruoyi.bps.express.response.QueryTrackResp; + +import com.kuaidi100.sdk.request.QueryTrackParam; +import com.kuaidi100.sdk.response.QueryTrackResp; + +import java.util.List; + +public interface IExpressService { + + public List QueryTrackExpressMultiList(List list); + /** + * 查询多条物流轨迹 + */ + public String QueryTrackExpressMulti(List list); + + /** + * 查询物流轨迹 + */ + public String QueryTrackExpress(QueryTrackParam qt); + + /** + * 订阅 + */ + public String SubscribeExpress(); + + /** + * 测试快递单号合集 + */ + public List GetTestQueryTrackParam(); +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/TopgpDdlService.java b/box-bps/src/main/java/com/ruoyi/bps/service/TopgpDdlService.java new file mode 100644 index 000000000..e2d2b4e6a --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/TopgpDdlService.java @@ -0,0 +1,22 @@ +package com.ruoyi.bps.service; + +public interface TopgpDdlService { + //修改表名 + int alterTableName(String originalTableName, String newTableName); + + // truncate指定数据库表的数据 + int truncateTable(String tableName); + + //drop 指定定数据库表 + int dropTable(String tableName); + + + //根据传入的表明,创建新的表并且将原表的数据插入到新的Occur表中 + void copyTable(String newTableName,String originalTableName); + + //统计某张表中的总数据条数 + int getRecordCount(String tableName); + + //从指定数据库中,查询是否存在某张表 + int isTableInDb(String dataBaseName, String tableName); +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/TopgpDdlServiceImpl.java b/box-bps/src/main/java/com/ruoyi/bps/service/TopgpDdlServiceImpl.java new file mode 100644 index 000000000..f2808e873 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/TopgpDdlServiceImpl.java @@ -0,0 +1,45 @@ +package com.ruoyi.bps.service; + +import com.ruoyi.bps.mapper.TopgpDdlMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +//@DataSource(value = DataSourceType.SLAVE) +//@DataSource(value = DataSourceType.TOPTESTDSREPORT) +public class TopgpDdlServiceImpl implements TopgpDdlService { + @Autowired + private TopgpDdlMapper topgpDdlMapper; + + //修改表名 + public int alterTableName(String originalTableName, String newTableName) + { + return topgpDdlMapper.alterTableName(originalTableName,newTableName); + } + + // truncate指定数据库表的数据 + public int truncateTable(String tableName){ + return topgpDdlMapper.truncateTable(tableName); + } + + //drop 指定定数据库表 + public int dropTable(String tableName){ + return topgpDdlMapper.dropTable(tableName); + } + + + //根据传入的表明,创建新的表并且将原表的数据插入到新的Occur表中 + public void copyTable(String newTableName,String originalTableName){ + return ; + } + + //统计某张表中的总数据条数 + public int getRecordCount(String tableName){ + return topgpDdlMapper.getRecordCount(tableName); + } + + //从指定数据库中,查询是否存在某张表 + public int isTableInDb(String dataBaseName, String tableName){ + return topgpDdlMapper.isTableInDb(dataBaseName,tableName); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java new file mode 100644 index 000000000..01bddbce9 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushApiServiceImpl.java @@ -0,0 +1,257 @@ +package com.ruoyi.bps.service.impl; + +import com.ruoyi.bps.domain.ExpSubsPushResp; +import com.ruoyi.bps.domain.ExpSubscribe; +import com.ruoyi.bps.service.IExpSubsPushApiService; +import com.ruoyi.bps.service.IExpSubsPushRespService; +import com.ruoyi.bps.service.IExpSubscribeService; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.StringUtils; +import com.google.gson.Gson; +import com.kuaidi100.sdk.api.Subscribe; +import com.kuaidi100.sdk.contant.ApiInfoConstant; +import com.kuaidi100.sdk.core.IBaseClient; +import com.kuaidi100.sdk.pojo.HttpResult; +import com.kuaidi100.sdk.request.SubscribeParam; +import com.kuaidi100.sdk.request.SubscribeParameters; +import com.kuaidi100.sdk.request.SubscribeReq; +import com.kuaidi100.sdk.response.SubscribePushData; +import com.kuaidi100.sdk.response.SubscribePushParamResp; +import com.kuaidi100.sdk.response.SubscribePushResult; +import com.kuaidi100.sdk.response.SubscribeResp; +import com.kuaidi100.sdk.utils.PropertiesReader; +import com.kuaidi100.sdk.utils.SignUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Service +public class ExpSubsPushApiServiceImpl implements IExpSubsPushApiService { + String key = PropertiesReader.get("key"); + String customer = PropertiesReader.get("customer"); + String secret = PropertiesReader.get("secret"); + String siid = PropertiesReader.get("siid"); + String userid = PropertiesReader.get("userid"); + String tid = PropertiesReader.get("tid"); + String secret_key = PropertiesReader.get("secret_key"); + String secret_secret = PropertiesReader.get("secret_secret"); + + @Autowired + private IExpSubsPushRespService expSubsPushRespService; + + @Autowired + IExpSubscribeService expSubscribeService; + + /** + * 订阅快递 + * @throws Exception + */ + @Override + public SubscribeResp ExpressSubscribe(ExpSubscribe expSubscribe) { + SubscribeParameters subscribeParameters = new SubscribeParameters(); + SubscribeResp subscribeResp = new SubscribeResp(); + subscribeParameters.setCallbackurl("http://report.bpsemi.cn:8081/it_war/anon/subscribeCallBackUrl"); + subscribeParameters.setPhone(expSubscribe.getPhone()); + subscribeParameters.setSalt("bpsemi"); + SubscribeParam subscribeParam = new SubscribeParam(); + subscribeParam.setParameters(subscribeParameters); + subscribeParam.setCompany(expSubscribe.getCompany()); + subscribeParam.setNumber(expSubscribe.getNumber()); + subscribeParam.setKey(key); + + SubscribeReq subscribeReq = new SubscribeReq(); + subscribeReq.setSchema(ApiInfoConstant.SUBSCRIBE_SCHEMA); + subscribeReq.setParam(new Gson().toJson(subscribeParam)); + + IBaseClient subscribe = new Subscribe(); + try{ + HttpResult httpResult= subscribe.execute(subscribeReq); + System.out.println(httpResult); + subscribeResp= new Gson().fromJson(httpResult.getBody(),SubscribeResp.class); + }catch (Exception e) + { + return subscribeResp; + } + //如果快递公司或快递单号为空,则直接返回订阅结果 + if(StringUtils.isEmpty(expSubscribe.getCompany()) || StringUtils.isEmpty(expSubscribe.getNumber())) + { + return subscribeResp; + } + + //订阅记录写入数据库 + ExpSubscribe newExpSubscribe = new ExpSubscribe(); + newExpSubscribe.setCompany(expSubscribe.getCompany()); + newExpSubscribe.setNumber(expSubscribe.getNumber()); + newExpSubscribe.setPhone(expSubscribe.getPhone()); + newExpSubscribe.setSalt("bpsemi"); + newExpSubscribe.setSubscribeTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss")); + newExpSubscribe.setResult((subscribeResp.isResult())?"ture":"false"); + newExpSubscribe.setReturnCode(subscribeResp.getReturnCode()); + newExpSubscribe.setMessage(subscribeResp.getMessage()); + + ExpSubscribe queryExpSubscribe = new ExpSubscribe(); + queryExpSubscribe.setCompany(expSubscribe.getCompany()); + queryExpSubscribe.setNumber(expSubscribe.getNumber()); + queryExpSubscribe.setResult(expSubscribe.getResult()); + queryExpSubscribe.setReturnCode(expSubscribe.getReturnCode()); + List list=expSubscribeService.selectExpSubscribeList(queryExpSubscribe); + if(list.size()>0){ + //如果数据库中存在快递单号+快递公司编码+结果+返回码相同,则更新记录 + for(ExpSubscribe es:list){ + queryExpSubscribe= newExpSubscribe; + queryExpSubscribe.setSid(es.getSid()); + expSubscribeService.updateExpSubscribe(queryExpSubscribe); + } + }else { + //如果数据库中没有快递单号+快递公司编码,则更插入新记录 + expSubscribeService.insertExpSubscribe(newExpSubscribe); + } + + //返回订阅结果 + return subscribeResp; + } + + /** + * 获取从快递100订阅的快递推送信息,并返回响应结果 + * + * @param request 快递100推送的订阅信息 + * @return 结果 + */ + @Override + public SubscribeResp ExpressSubscribeCallBackUrl(HttpServletRequest request) { + //如果推送信息中没有包含 + if(StringUtils.isEmpty(request.getParameter("param")) + || StringUtils.isEmpty(request.getParameter("sign"))) { + SubscribeResp subscribeResp= new SubscribeResp(); + subscribeResp.setResult(Boolean.FALSE); + subscribeResp.setReturnCode("701"); + subscribeResp.setMessage("推送的信息不合法!"); + return subscribeResp; + } + + String param= request.getParameter("param"); + String sign = request.getParameter("sign"); + //log.debug("快递100订阅推送回调结果|{}|{}",param,sign); + //订阅时传的salt + String salt = "bpsemi"; + String ourSign = SignUtils.sign(param + salt); + SubscribeResp subscribeResp = new SubscribeResp(); + subscribeResp.setResult(Boolean.TRUE); + subscribeResp.setReturnCode("200"); + //加密如果不等,则不属于快递100推送,忽略掉当前请求 + if (!ourSign.equals(sign)){ + subscribeResp.setMessage("接受成功!但加密验证不通过!【sign】"+sign+"【ourSign】"+ourSign); + return subscribeResp; + } + //加密相等,继续处理业务逻辑 + subscribeResp.setMessage("接受成功!加密验证通过!【sign】"+sign+"【ourSign】"+ourSign); + + SubscribePushParamResp subscribePushParamResp = new Gson().fromJson(param, SubscribePushParamResp.class); + SubscribePushResult subscribePushResult = subscribePushParamResp.getLastResult(); + //快递单号 + String nu = subscribePushResult.getNu(); + //监控状态 (polling:监控中,shutdown:结束,abort:中止,updateall:重新推送。其中当快递单为已签收时status=shutdown) + String status= subscribePushParamResp.getStatus(); + if(status.equals("abort")){ + //todo + //当message为“3天查询无记录”或“60天无变化时”status= abort ,对于status=abort的状态的处理逻辑 + //将Abort信息存档。然后预警 + + } + //快递单当前状态 (0在途,1揽收,2疑难,3签收,4退签,5派件,6退回,7转单,10待清关,11清关中,12已清关,13清关异常,14收件人拒签) + String state = subscribePushResult.getState(); + if(state.equals("3")){ + //处理签收逻辑 + //将快递流转状态存入数据库 + ExpSubsPushResp expSubsPushResp=new ExpSubsPushResp(); + expSubsPushResp.setLastResultNu(subscribePushResult.getNu()); + expSubsPushResp.setLastResultCom(subscribePushResult.getCom()); + List list=expSubsPushRespService.selectExpSubsPushRespList(expSubsPushResp); + if(list.size()>0){ + //如果数据库中存在快递单号+快递公司编码,则更新记录 + ExpSubsPushResp newExpSubsPushResp= ToExpSubsPushResp(subscribePushParamResp); + for(ExpSubsPushResp expr:list){ + newExpSubsPushResp.setSid(expr.getSid()); + expSubsPushRespService.updateExpSubsPushResp(newExpSubsPushResp); + newExpSubsPushResp.setSid(null); + } + }else { + //如果数据库中没有快递单号+快递公司编码,则更插入新记录 + expSubsPushRespService.insertExpSubsPushResp(ToExpSubsPushResp(subscribePushParamResp)); + } + } + + return subscribeResp; + } + + /** + * 将快递100推送的信息转换为ExpSubsPushResp + * @param subscribePushParamResp + * @return ExpSubsPushResp + */ + private ExpSubsPushResp ToExpSubsPushResp(SubscribePushParamResp subscribePushParamResp){ + ExpSubsPushResp expSubsPushResp=new ExpSubsPushResp(); + + SubscribePushResult subscribePushLastResult = subscribePushParamResp.getLastResult(); + SubscribePushResult subscribePushDestResult = subscribePushParamResp.getDestResult(); + + expSubsPushResp.setStatus(subscribePushParamResp.getStatus()); + expSubsPushResp.setBillStatus(subscribePushParamResp.getBillstatus()); + expSubsPushResp.setMessage(subscribePushParamResp.getMessage()); + expSubsPushResp.setAutoCheck(subscribePushParamResp.getAutoCheck()); + expSubsPushResp.setComOld(subscribePushParamResp.getComOld()); + expSubsPushResp.setComNew(subscribePushParamResp.getComNew()); + + expSubsPushResp.setLastResultMessage(subscribePushLastResult.getMessage()); + expSubsPushResp.setLastResultState(subscribePushLastResult.getState()); + expSubsPushResp.setLastResulStatus(subscribePushLastResult.getStatus()); + expSubsPushResp.setLastResultCondition(subscribePushLastResult.getCondition()); + expSubsPushResp.setLastResultIsCheck(subscribePushLastResult.getIscheck()); + expSubsPushResp.setLastResultCom(subscribePushLastResult.getCom()); + expSubsPushResp.setLastResultNu(subscribePushLastResult.getNu()); + expSubsPushResp.setLastResultData(SubscribePushDataToString(subscribePushLastResult.getData())); + + if(subscribePushDestResult != null) { + //只有邮政国外的快递推送才会有DestResult信息 + expSubsPushResp.setDestResultMessage(subscribePushDestResult.getMessage()); + expSubsPushResp.setDestResultState(subscribePushDestResult.getState()); + expSubsPushResp.setDestResultStatus(subscribePushDestResult.getStatus()); + expSubsPushResp.setDestResultCondition(subscribePushDestResult.getCondition()); + expSubsPushResp.setDestResultIsCheck(subscribePushDestResult.getIscheck()); + expSubsPushResp.setDestResultCom(subscribePushDestResult.getCom()); + expSubsPushResp.setDestResultNu(subscribePushDestResult.getNu()); + expSubsPushResp.setDestResultData(SubscribePushDataToString(subscribePushDestResult.getData())); + } + + return expSubsPushResp; + } + + /** + * + * @param list 将List转化为字符串 + * @return + */ + private String SubscribePushDataToString(List list){ + String str=""; + for(SubscribePushData subscribePushData:list){ + str+="【"+subscribePushData.getTime()+"】 "; + if(StringUtils.isNotEmpty(subscribePushData.getAreaName())) + { + str+=subscribePushData.getAreaName()+"/"; //某些快递没有AreaName信息 + } + str+=subscribePushData.getContext(); + if(list.size()-1>list.indexOf(subscribePushData)){ + //str+="\r\n"; + str+="
"; + } + } + System.out.println(str); + return str; + } + + + + +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushRespServiceImpl.java b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushRespServiceImpl.java new file mode 100644 index 000000000..777b2568d --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubsPushRespServiceImpl.java @@ -0,0 +1,95 @@ +package com.ruoyi.bps.service.impl; + +import com.ruoyi.bps.domain.ExpSubsPushResp; +import com.ruoyi.bps.mapper.ExpSubsPushRespMapper; +import com.ruoyi.bps.service.IExpSubsPushRespService; +import com.ruoyi.common.core.text.Convert; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 快递订阅推送信息Service业务层处理 + * + * @author box + * @date 2021-05-13 + */ +@Service +public class ExpSubsPushRespServiceImpl implements IExpSubsPushRespService +{ + @Autowired + private ExpSubsPushRespMapper expSubsPushRespMapper; + + /** + * 查询快递订阅推送信息 + * + * @param sid 快递订阅推送信息ID + * @return 快递订阅推送信息 + */ + @Override + public ExpSubsPushResp selectExpSubsPushRespById(Long sid) + { + return expSubsPushRespMapper.selectExpSubsPushRespById(sid); + } + + /** + * 查询快递订阅推送信息列表 + * + * @param expSubsPushResp 快递订阅推送信息 + * @return 快递订阅推送信息 + */ + @Override + public List selectExpSubsPushRespList(ExpSubsPushResp expSubsPushResp) + { + return expSubsPushRespMapper.selectExpSubsPushRespList(expSubsPushResp); + } + + /** + * 新增快递订阅推送信息 + * + * @param expSubsPushResp 快递订阅推送信息 + * @return 结果 + */ + @Override + public int insertExpSubsPushResp(ExpSubsPushResp expSubsPushResp) + { + return expSubsPushRespMapper.insertExpSubsPushResp(expSubsPushResp); + } + + /** + * 修改快递订阅推送信息 + * + * @param expSubsPushResp 快递订阅推送信息 + * @return 结果 + */ + @Override + public int updateExpSubsPushResp(ExpSubsPushResp expSubsPushResp) + { + return expSubsPushRespMapper.updateExpSubsPushResp(expSubsPushResp); + } + + /** + * 删除快递订阅推送信息对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteExpSubsPushRespByIds(String ids) + { + return expSubsPushRespMapper.deleteExpSubsPushRespByIds(Convert.toStrArray(ids)); + } + + /** + * 删除快递订阅推送信息信息 + * + * @param sid 快递订阅推送信息ID + * @return 结果 + */ + @Override + public int deleteExpSubsPushRespById(Long sid) + { + return expSubsPushRespMapper.deleteExpSubsPushRespById(sid); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubscribeServiceImpl.java b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubscribeServiceImpl.java new file mode 100644 index 000000000..5ff9d2dcd --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpSubscribeServiceImpl.java @@ -0,0 +1,95 @@ +package com.ruoyi.bps.service.impl; + +import com.ruoyi.bps.domain.ExpSubscribe; +import com.ruoyi.bps.mapper.ExpSubscribeMapper; +import com.ruoyi.bps.service.IExpSubscribeService; +import com.ruoyi.common.core.text.Convert; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 快递订阅Service业务层处理 + * + * @author box + * @date 2021-05-20 + */ +@Service +public class ExpSubscribeServiceImpl implements IExpSubscribeService +{ + @Autowired + private ExpSubscribeMapper expSubscribeMapper; + + /** + * 查询快递订阅 + * + * @param sid 快递订阅ID + * @return 快递订阅 + */ + @Override + public ExpSubscribe selectExpSubscribeById(Long sid) + { + return expSubscribeMapper.selectExpSubscribeById(sid); + } + + /** + * 查询快递订阅列表 + * + * @param expSubscribe 快递订阅 + * @return 快递订阅 + */ + @Override + public List selectExpSubscribeList(ExpSubscribe expSubscribe) + { + return expSubscribeMapper.selectExpSubscribeList(expSubscribe); + } + + /** + * 新增快递订阅 + * + * @param expSubscribe 快递订阅 + * @return 结果 + */ + @Override + public int insertExpSubscribe(ExpSubscribe expSubscribe) + { + return expSubscribeMapper.insertExpSubscribe(expSubscribe); + } + + /** + * 修改快递订阅 + * + * @param expSubscribe 快递订阅 + * @return 结果 + */ + @Override + public int updateExpSubscribe(ExpSubscribe expSubscribe) + { + return expSubscribeMapper.updateExpSubscribe(expSubscribe); + } + + /** + * 删除快递订阅对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteExpSubscribeByIds(String ids) + { + return expSubscribeMapper.deleteExpSubscribeByIds(Convert.toStrArray(ids)); + } + + /** + * 删除快递订阅信息 + * + * @param sid 快递订阅ID + * @return 结果 + */ + @Override + public int deleteExpSubscribeById(Long sid) + { + return expSubscribeMapper.deleteExpSubscribeById(sid); + } +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpressInfoServiceImpl.java b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpressInfoServiceImpl.java new file mode 100644 index 000000000..0f7163412 --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpressInfoServiceImpl.java @@ -0,0 +1,259 @@ +package com.ruoyi.bps.service.impl; + +import com.ruoyi.bps.domain.ExpressInfo; +import com.ruoyi.bps.mapper.ExpressInfoMapper; +import com.ruoyi.bps.service.IExpressInfoService; +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.utils.StringUtils; +import com.google.gson.Gson; +import com.kuaidi100.sdk.api.AutoNum; +import com.kuaidi100.sdk.api.QueryTrack; +import com.kuaidi100.sdk.core.IBaseClient; +import com.kuaidi100.sdk.pojo.HttpResult; +import com.kuaidi100.sdk.request.AutoNumReq; +import com.kuaidi100.sdk.request.QueryTrackParam; +import com.kuaidi100.sdk.request.QueryTrackReq; +import com.kuaidi100.sdk.response.AutoNumResp; +import com.kuaidi100.sdk.response.QueryTrackData; +import com.kuaidi100.sdk.response.QueryTrackResp; +import com.kuaidi100.sdk.utils.PropertiesReader; +import com.kuaidi100.sdk.utils.SignUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * 快递信息Service业务层处理 + * + * @author box + * @date 2021-05-06 + */ +@Service +public class ExpressInfoServiceImpl implements IExpressInfoService +{ + /* + String key = "Jydbrxsm2311"; + String customer = "2DD48B3469B82F2B7700569093AB792B"; + String secret = "8781ed9b35a7438499eb02fee915915a"; + String userid = "2a62da2192c24d17a943ff78ee64f8c6"; + + */ + + String key = PropertiesReader.get("key"); + String customer = PropertiesReader.get("customer"); + String secret = PropertiesReader.get("secret"); + String siid = PropertiesReader.get("siid"); + String userid = PropertiesReader.get("userid"); + String tid = PropertiesReader.get("tid"); + String secret_key = PropertiesReader.get("secret_key"); + String secret_secret = PropertiesReader.get("secret_secret"); + + + + String msg=""; + + @Autowired + private ExpressInfoMapper expressInfoMapper; + + /** + * 查询快递信息 + * + * @param message 快递信息ID + * @return 快递信息 + */ + @Override + public ExpressInfo selectExpressInfoById(String message) + { + return expressInfoMapper.selectExpressInfoById(message); + } + + /** + * 查询快递信息列表 + * + * @param expressInfo 快递信息 + * @return 快递信息列表 + */ + @Override + public List selectExpressInfoList(ExpressInfo expressInfo) + { + List expressInfoList=new ArrayList<>(); + //如果没有输入订单号,则返回空信息 + String nuStr=expressInfo.getNu(); + if(StringUtils.isEmpty(nuStr)){ + expressInfo.setData("请输入订单号进行查询!"); + expressInfoList.add(expressInfo); + return expressInfoList; + } + //如果是顺丰,则必须要输入电话号码 + if( StringUtils.isEmpty(expressInfo.getPhone()) + && (expressInfo.getCom().equals("nsf") || expressInfo.getCom().contains("shunfeng"))){ + expressInfo.setData("查询顺丰快递信息,必须要提供收/寄人电话号码"); + expressInfoList.add(expressInfo); + return expressInfoList; + } + + List stringList= Arrays.asList(nuStr.split(",")); + ExpressInfo newExpressInfo= expressInfo; + for(String str:stringList){ + newExpressInfo.setNu(str); + expressInfoList.add(SelectExpressInfo(newExpressInfo)); + } + return expressInfoList; + //return expressInfoMapper.selectExpressInfoList(expressInfo); + } + + private ExpressInfo SelectExpressInfo(ExpressInfo expressInfo){ + String nu=expressInfo.getNu(); //快递单号 + String com=expressInfo.getCom(); //快递公司 + String phone=expressInfo.getPhone(); //收、寄件人电话号码 + ExpressInfo callbackExpressInfo=new ExpressInfo(); + + callbackExpressInfo.setNu(nu); + callbackExpressInfo.setPhone(phone); + //如果没有输入快递公司编号,则查询快递公司编号 + if(StringUtils.isEmpty(com)){ + if(AutoGetExpressCom(nu)==null){ + callbackExpressInfo.setData("根据快递单号查询不到快递公司,请确认快递单号是否正确!"); + return callbackExpressInfo; + } + com=AutoGetExpressCom(nu).getComCode(); + } + callbackExpressInfo.setCom(com); + + //return callbackExpressInfo; + return QueryExpressInfo(callbackExpressInfo); + } + + private ExpressInfo QueryExpressInfo(ExpressInfo expressInfo){ + //从expressInfo中获取快递单号、物流信息、电话,生成快递请求参数 + QueryTrackParam queryTrackParam= new QueryTrackParam(); + queryTrackParam.setNum(expressInfo.getNu()); + queryTrackParam.setCom(expressInfo.getCom()); + queryTrackParam.setPhone(expressInfo.getPhone()); + + //获取快递信息 + String param = new Gson().toJson(queryTrackParam); + QueryTrackReq queryTrackReq=new QueryTrackReq(); + queryTrackReq.setParam(param); + queryTrackReq.setCustomer(customer); + queryTrackReq.setSign(SignUtils.querySign(param ,key,customer)); + HttpResult httpResult =new HttpResult(); + IBaseClient baseClient = new QueryTrack(); + try { + httpResult = baseClient.execute(queryTrackReq); + msg=httpResult.getBody(); + } + catch (Exception e) { + msg=e.toString(); + } + + //将快递信息转化为QueryTrackResp对象 + QueryTrackResp queryTrackResp = new Gson().fromJson(msg,QueryTrackResp.class); + + //如果没有查到物流信息,则返回错误信息 + if(StringUtils.isEmpty(queryTrackResp.getStatus()) || !queryTrackResp.getStatus().equals("200")){ + expressInfo.setData(queryTrackResp.getMessage()); + return expressInfo; + } + + //将快递信息中的Context转化为字符 + String dataStr=""; + for(QueryTrackData queryTrackData :queryTrackResp.getData()){ + dataStr+="【"+queryTrackData.getTime()+"】 "; + dataStr+=queryTrackData.getContext(); + if(queryTrackResp.getData().size()-1>queryTrackResp.getData().indexOf(queryTrackData)){ + dataStr+="\r"; + } + } + ExpressInfo callbackExpressInfo=new ExpressInfo(); + callbackExpressInfo.setMessage(queryTrackResp.getMessage()); + callbackExpressInfo.setNu(queryTrackResp.getNu()); + callbackExpressInfo.setIscheck(queryTrackResp.getIscheck()); + callbackExpressInfo.setCom(queryTrackResp.getCom()); + callbackExpressInfo.setStatus(queryTrackResp.getStatus()); + callbackExpressInfo.setData(dataStr); + callbackExpressInfo.setState(queryTrackResp.getState()); + callbackExpressInfo.setCondition(queryTrackResp.getCondition()); + callbackExpressInfo.setRouteInfo(""); //出发位置,当前位置,到达位置,暂无信息 + callbackExpressInfo.setReturnCode(queryTrackResp.getReturnCode()); + callbackExpressInfo.setResult(queryTrackResp.isResult()?"Y":"N"); + callbackExpressInfo.setPhone(expressInfo.getPhone()); + + return callbackExpressInfo; + } + + /** + * 根据快递单号,查询快递公司编码 + * @param num 快递单号 + * @return 快递公司编码 + */ + + private AutoNumResp AutoGetExpressCom(String num){ + AutoNumReq autoNumReq = new AutoNumReq(); + autoNumReq.setKey(key); + autoNumReq.setNum(num); + + IBaseClient baseClient = new AutoNum(); + AutoNumResp autoNumResp=new AutoNumResp(); + try { + String str= baseClient.execute(autoNumReq).getBody().replace("[","").replace("]",""); + autoNumResp = new Gson().fromJson(str,AutoNumResp.class); + + } catch (Exception e) { + e.printStackTrace(); + } + return autoNumResp; + } + + /** + * 新增快递信息 + * + * @param expressInfo 快递信息 + * @return 结果 + */ + @Override + public int insertExpressInfo(ExpressInfo expressInfo) + { + return expressInfoMapper.insertExpressInfo(expressInfo); + } + + /** + * 修改快递信息 + * + * @param expressInfo 快递信息 + * @return 结果 + */ + @Override + public int updateExpressInfo(ExpressInfo expressInfo) + { + return expressInfoMapper.updateExpressInfo(expressInfo); + } + + /** + * 删除快递信息对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteExpressInfoByIds(String ids) + { + return expressInfoMapper.deleteExpressInfoByIds(Convert.toStrArray(ids)); + } + + /** + * 删除快递信息信息 + * + * @param message 快递信息ID + * @return 结果 + */ + @Override + public int deleteExpressInfoById(String message) + { + return expressInfoMapper.deleteExpressInfoById(message); + } + +} diff --git a/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpressServiceImpl.java b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpressServiceImpl.java new file mode 100644 index 000000000..05f8c7f7c --- /dev/null +++ b/box-bps/src/main/java/com/ruoyi/bps/service/impl/ExpressServiceImpl.java @@ -0,0 +1,199 @@ +package com.ruoyi.bps.service.impl; + +//import com.ruoyi.bps.express.api.QueryTrack; +//import com.ruoyi.bps.express.api.Subscribe; +//import com.ruoyi.bps.express.contant.ApiInfoConstant; +//import com.ruoyi.bps.express.contant.CompanyConstant; +//import com.ruoyi.bps.express.core.IBaseClient; +//import com.ruoyi.bps.express.pojo.HttpResult; +//import com.ruoyi.bps.express.request.*; + +//import com.ruoyi.bps.express.response.QueryTrackResp; +//import com.ruoyi.bps.express.utils.PropertiesReader; +//import com.ruoyi.bps.express.utils.SignUtils; + +import com.google.gson.Gson; +import com.kuaidi100.sdk.api.QueryTrack; +import com.kuaidi100.sdk.api.Subscribe; +import com.kuaidi100.sdk.contant.ApiInfoConstant; +import com.kuaidi100.sdk.core.IBaseClient; +import com.kuaidi100.sdk.pojo.HttpResult; +import com.kuaidi100.sdk.request.*; +import com.kuaidi100.sdk.response.QueryTrackResp; +import com.kuaidi100.sdk.utils.PropertiesReader; +import com.kuaidi100.sdk.utils.SignUtils; +import com.ruoyi.bps.service.IExpressService; +import org.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Service +public class ExpressServiceImpl implements IExpressService { + /* + String key = "Jydbrxsm2311"; + String customer = "2DD48B3469B82F2B7700569093AB792B"; + String secret = "8781ed9b35a7438499eb02fee915915a"; + String userid = "2a62da2192c24d17a943ff78ee64f8c6"; + */ + String key = PropertiesReader.get("key"); + String customer = PropertiesReader.get("customer"); + String secret = PropertiesReader.get("secret"); + String siid = PropertiesReader.get("siid"); + String userid = PropertiesReader.get("userid"); + String tid = PropertiesReader.get("tid"); + String secret_key = PropertiesReader.get("secret_key"); + String secret_secret = PropertiesReader.get("secret_secret"); + String msg=""; + @Autowired + IExpressService expressService; + + @Override + public List QueryTrackExpressMultiList(List list) { + List qtList=new ArrayList<>(); + + for(QueryTrackParam queryTrackParam:list) + { + QueryTrackResp queryTrackResp = new Gson().fromJson(expressService.QueryTrackExpress(queryTrackParam),QueryTrackResp.class); + qtList.add(queryTrackResp); + } + return qtList; + } + + /** + *查询多个物流轨迹 + */ + @Override + public String QueryTrackExpressMulti(List list) { + String str=""; + for(QueryTrackParam qt:list){ + str += QueryTrackExpress(qt); + } + return str; + } + + /** + * 查询单个物流轨迹 + */ + @Override + public String QueryTrackExpress(QueryTrackParam queryTrackParam) { + String str=""; + QueryTrackReq queryTrackReq = new QueryTrackReq(); + String param = new Gson().toJson(queryTrackParam); + + queryTrackReq.setParam(param); + queryTrackReq.setCustomer(customer); + queryTrackReq.setSign(SignUtils.querySign(param ,key,customer)); + HttpResult httpResult=new HttpResult(); + IBaseClient baseClient = new QueryTrack(); + try { + httpResult = baseClient.execute(queryTrackReq); + msg=httpResult.getBody(); + } + catch (Exception e) { + msg=e.toString(); + } + + JSONObject jsonObject = new JSONObject(msg); + if (jsonObject.has("returnCode")){ + QueryTrackResp queryTrackResp= new Gson().fromJson(msg,QueryTrackResp.class); + queryTrackResp.setStatus(queryTrackResp.getReturnCode()); + queryTrackResp.setNu(queryTrackParam.getNum()); + msg= new Gson().toJson(queryTrackResp); + } + /* else { + QueryTrackResp queryTrackResp=new Gson().fromJson(msg,QueryTrackResp.class); + for(int i=0;i GetTestQueryTrackParam() { + QueryTrackParam queryTrackParam = new QueryTrackParam(); + List list=new ArrayList(); + queryTrackParam.setCom("annengwuliu"); + queryTrackParam.setNum("300445967949"); + queryTrackParam.setPhone("17725390266"); + list.add(queryTrackParam); + + QueryTrackParam queryTrackParam1 = new QueryTrackParam(); + queryTrackParam1.setCom("annengwuliu"); + queryTrackParam1.setNum("300445967135"); + queryTrackParam1.setPhone("17725390266"); + list.add(queryTrackParam1); + + + QueryTrackParam queryTrackParam2 = new QueryTrackParam(); + queryTrackParam2.setCom("annengwuliu"); + queryTrackParam2.setNum("3004459670971"); + queryTrackParam2.setPhone("17725390266"); + list.add(queryTrackParam2); +/* + QueryTrackParam queryTrackParam3 = new QueryTrackParam(); + queryTrackParam3.setCom(CompanyConstant.AN); + queryTrackParam3.setNum("300445967045"); + queryTrackParam3.setPhone("17725390266"); + list.add(queryTrackParam3); + + QueryTrackParam queryTrackParam4 = new QueryTrackParam(); + queryTrackParam4.setCom(CompanyConstant.AN); + queryTrackParam4.setNum("300443569920"); + queryTrackParam4.setPhone("17725390266"); + list.add(queryTrackParam4); + + QueryTrackParam queryTrackParam5 = new QueryTrackParam(); + queryTrackParam5.setCom(CompanyConstant.AN); + queryTrackParam5.setNum("300443569878"); + queryTrackParam5.setPhone("17725390266"); + list.add(queryTrackParam5); + + QueryTrackParam queryTrackParam6 = new QueryTrackParam(); + queryTrackParam6.setCom(CompanyConstant.AN); + queryTrackParam6.setNum("300443569880"); + queryTrackParam6.setPhone("17725390266"); + list.add(queryTrackParam6); + */ + return list; + } + + +} diff --git a/box-bps/src/main/resources/account.properties b/box-bps/src/main/resources/account.properties new file mode 100644 index 000000000..c7f7dc6a0 --- /dev/null +++ b/box-bps/src/main/resources/account.properties @@ -0,0 +1,25 @@ +#快递100的基础账号信息,可以在这里获取 +# https://poll.kuaidi100.com/manager/page/myinfo/enterprise +key = Jydbrxsm2311 +customer = 2DD48B3469B82F2B7700569093AB792B +secret = 8781ed9b35a7438499eb02fee915915a +userid = 2a62da2192c24d17a943ff78ee64f8c6 + +#电子面单快递公司账号信息(非必填) +partnerId = +partnerKey = +net = +siid = + +#短信模板id(非必填) +tid = + +#云平台相关(非必填) +#登录云平台 https://cloud.kuaidi100.com/buyer/user/info +secret_key = +secret_secret = + +#是否记录快递100接口返回结果,建议记录日志或者入库,方便后期有问题双方排查(true:启用 false: 关闭 ) +log.return.record = true +#日志记录位置,建议根据自身情况配置 +logPath = logs \ No newline at end of file diff --git a/box-bps/src/main/resources/mapper/bps/ExpSubsPushRespMapper.xml b/box-bps/src/main/resources/mapper/bps/ExpSubsPushRespMapper.xml new file mode 100644 index 000000000..0c10253a7 --- /dev/null +++ b/box-bps/src/main/resources/mapper/bps/ExpSubsPushRespMapper.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select sid, status, billStatus, message, autoCheck, comOld, comNew, lastResultMessage, lastResultState, lastResulStatus, lastResultCondition, lastResultIsCheck, lastResultCom, lastResultNu, lastResultData, destResultMessage, destResultState, destResultStatus, destResultCondition, destResultIsCheck, destResultCom, destResultNu, destResultData from exp_subs_push_resp + + + + + + + + insert into exp_subs_push_resp + + status, + billStatus, + message, + autoCheck, + comOld, + comNew, + lastResultMessage, + lastResultState, + lastResulStatus, + lastResultCondition, + lastResultIsCheck, + lastResultCom, + lastResultNu, + lastResultData, + destResultMessage, + destResultState, + destResultStatus, + destResultCondition, + destResultIsCheck, + destResultCom, + destResultNu, + destResultData, + + + #{status}, + #{billStatus}, + #{message}, + #{autoCheck}, + #{comOld}, + #{comNew}, + #{lastResultMessage}, + #{lastResultState}, + #{lastResulStatus}, + #{lastResultCondition}, + #{lastResultIsCheck}, + #{lastResultCom}, + #{lastResultNu}, + #{lastResultData}, + #{destResultMessage}, + #{destResultState}, + #{destResultStatus}, + #{destResultCondition}, + #{destResultIsCheck}, + #{destResultCom}, + #{destResultNu}, + #{destResultData}, + + + + + update exp_subs_push_resp + + status = #{status}, + billStatus = #{billStatus}, + message = #{message}, + autoCheck = #{autoCheck}, + comOld = #{comOld}, + comNew = #{comNew}, + lastResultMessage = #{lastResultMessage}, + lastResultState = #{lastResultState}, + lastResulStatus = #{lastResulStatus}, + lastResultCondition = #{lastResultCondition}, + lastResultIsCheck = #{lastResultIsCheck}, + lastResultCom = #{lastResultCom}, + lastResultNu = #{lastResultNu}, + lastResultData = #{lastResultData}, + destResultMessage = #{destResultMessage}, + destResultState = #{destResultState}, + destResultStatus = #{destResultStatus}, + destResultCondition = #{destResultCondition}, + destResultIsCheck = #{destResultIsCheck}, + destResultCom = #{destResultCom}, + destResultNu = #{destResultNu}, + destResultData = #{destResultData}, + + where sid = #{sid} + + + + delete from exp_subs_push_resp where sid = #{sid} + + + + delete from exp_subs_push_resp where sid in + + #{sid} + + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/mapper/bps/ExpSubscribeMapper.xml b/box-bps/src/main/resources/mapper/bps/ExpSubscribeMapper.xml new file mode 100644 index 000000000..a6c166466 --- /dev/null +++ b/box-bps/src/main/resources/mapper/bps/ExpSubscribeMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + select sid, company, number, phone, salt, subscribeTime, result, returnCode, message from exp_subscribe + + + + + + + + insert into exp_subscribe + + company, + number, + phone, + salt, + subscribeTime, + result, + returnCode, + message, + + + #{company}, + #{number}, + #{phone}, + #{salt}, + #{subscribeTime}, + #{result}, + #{returnCode}, + #{message}, + + + + + update exp_subscribe + + company = #{company}, + number = #{number}, + phone = #{phone}, + salt = #{salt}, + subscribeTime = #{subscribeTime}, + result = #{result}, + returnCode = #{returnCode}, + message = #{message}, + + where sid = #{sid} + + + + delete from exp_subscribe where sid = #{sid} + + + + delete from exp_subscribe where sid in + + #{sid} + + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/mapper/bps/ExpressInfoMapper.xml b/box-bps/src/main/resources/mapper/bps/ExpressInfoMapper.xml new file mode 100644 index 000000000..57682de91 --- /dev/null +++ b/box-bps/src/main/resources/mapper/bps/ExpressInfoMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + select message, nu, ischeck, com, status, data, state, condition, routeInfo, returnCode, result, phone from expressInfo + + + + + + + + insert into expressInfo + + message, + nu, + ischeck, + com, + status, + data, + state, + condition, + routeInfo, + returnCode, + result, + phone, + + + #{message}, + #{nu}, + #{ischeck}, + #{com}, + #{status}, + #{data}, + #{state}, + #{condition}, + #{routeInfo}, + #{returnCode}, + #{result}, + #{phone}, + + + + + update expressInfo + + nu = #{nu}, + ischeck = #{ischeck}, + com = #{com}, + status = #{status}, + data = #{data}, + state = #{state}, + condition = #{condition}, + routeInfo = #{routeInfo}, + returnCode = #{returnCode}, + result = #{result}, + phone = #{phone}, + + where message = #{message} + + + + delete from expressInfo where message = #{message} + + + + delete from expressInfo where message in + + #{message} + + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/mapper/bps/TopgpDdlMapper.xml b/box-bps/src/main/resources/mapper/bps/TopgpDdlMapper.xml new file mode 100644 index 000000000..553117013 --- /dev/null +++ b/box-bps/src/main/resources/mapper/bps/TopgpDdlMapper.xml @@ -0,0 +1,29 @@ + + + + + + alter table ${originalTableName} rename ${newTableName} + + + + truncate table ${tableName} + + + + drop table ${tableName} + + + + create table ${newTableName} as select * from ${originalTableName} + + + + + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/bps/expressInfo/add.html b/box-bps/src/main/resources/templates/bps/expressInfo/add.html new file mode 100644 index 000000000..7a2c96f55 --- /dev/null +++ b/box-bps/src/main/resources/templates/bps/expressInfo/add.html @@ -0,0 +1,97 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/bps/expressInfo/edit.html b/box-bps/src/main/resources/templates/bps/expressInfo/edit.html new file mode 100644 index 000000000..909109769 --- /dev/null +++ b/box-bps/src/main/resources/templates/bps/expressInfo/edit.html @@ -0,0 +1,98 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/bps/expressInfo/expressInfo.html b/box-bps/src/main/resources/templates/bps/expressInfo/expressInfo.html new file mode 100644 index 000000000..183543dfd --- /dev/null +++ b/box-bps/src/main/resources/templates/bps/expressInfo/expressInfo.html @@ -0,0 +1,145 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/bps/expsubspushresp/add.html b/box-bps/src/main/resources/templates/bps/expsubspushresp/add.html new file mode 100644 index 000000000..111562c1d --- /dev/null +++ b/box-bps/src/main/resources/templates/bps/expsubspushresp/add.html @@ -0,0 +1,169 @@ + + + + + + +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/bps/expsubspushresp/edit.html b/box-bps/src/main/resources/templates/bps/expsubspushresp/edit.html new file mode 100644 index 000000000..b4a69065b --- /dev/null +++ b/box-bps/src/main/resources/templates/bps/expsubspushresp/edit.html @@ -0,0 +1,170 @@ + + + + + + +
+
+ +
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/bps/expsubspushresp/expsubspushresp.html b/box-bps/src/main/resources/templates/bps/expsubspushresp/expsubspushresp.html new file mode 100644 index 000000000..5e89e3450 --- /dev/null +++ b/box-bps/src/main/resources/templates/bps/expsubspushresp/expsubspushresp.html @@ -0,0 +1,237 @@ + + + + + + +
+
+
+
+
+
    + + + +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • + +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/bps/subscribe/add.html b/box-bps/src/main/resources/templates/bps/subscribe/add.html new file mode 100644 index 000000000..602e167c3 --- /dev/null +++ b/box-bps/src/main/resources/templates/bps/subscribe/add.html @@ -0,0 +1,75 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/bps/subscribe/edit.html b/box-bps/src/main/resources/templates/bps/subscribe/edit.html new file mode 100644 index 000000000..035677c9d --- /dev/null +++ b/box-bps/src/main/resources/templates/bps/subscribe/edit.html @@ -0,0 +1,76 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/bps/subscribe/subscribe.html b/box-bps/src/main/resources/templates/bps/subscribe/subscribe.html new file mode 100644 index 000000000..d7252dad0 --- /dev/null +++ b/box-bps/src/main/resources/templates/bps/subscribe/subscribe.html @@ -0,0 +1,169 @@ + + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
  • +  订阅 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/box-bps/src/main/resources/templates/express/queryExpress.html b/box-bps/src/main/resources/templates/express/queryExpress.html new file mode 100644 index 000000000..2b6bb25ca --- /dev/null +++ b/box-bps/src/main/resources/templates/express/queryExpress.html @@ -0,0 +1,98 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/box-test/pom.xml b/box-test/pom.xml new file mode 100644 index 000000000..d606da50d --- /dev/null +++ b/box-test/pom.xml @@ -0,0 +1,28 @@ + + + + ruoyi + com.ruoyi + 4.6.1 + + 4.0.0 + + box-test + + + test系统模块 + + + + + + + com.ruoyi + ruoyi-common + + + + + \ No newline at end of file diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/ApiController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/ApiController.java new file mode 100644 index 000000000..e3a4c9f77 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/ApiController.java @@ -0,0 +1,61 @@ +package com.ruoyi.test.conrtroller; + +import com.ruoyi.common.core.domain.AjaxResult; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.apache.shiro.authz.annotation.RequiresRoles; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * + * 测试权限登录访问请求 + * + * 登录访问(返回token) POST / http://localhost:80/jwt/login?username=ry&password=admin123 + * + * 测试任意权限(header携带token) GET / http://localhost:80/api/list + * + * 测试菜单权限(header携带token) GET / http://localhost:80/api/user/list + * + * 测试角色权限(header携带token) GET / http://localhost:80/api/role/list + * + */ + + + +@RestController +@RequestMapping("/api") +public class ApiController +{ + /** + * 无权限访问 + * + * @return + */ + @GetMapping("/list") + public AjaxResult list() + { + return AjaxResult.success("list success"); + } + + /** + * 菜单权限 system:user:list + */ + @GetMapping("/user/list") + @RequiresPermissions("system:user:list") + public AjaxResult userlist() + { + return AjaxResult.success("user list success"); + } + + /** + * 角色权限 admin + */ + @GetMapping("/role/list") + @RequiresRoles("admin") + public AjaxResult rolelist() + { + return AjaxResult.success("role list success"); + } +} \ No newline at end of file diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/BoxTestController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/BoxTestController.java new file mode 100644 index 000000000..f282d9344 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/BoxTestController.java @@ -0,0 +1,18 @@ +package com.ruoyi.test.conrtroller; + +import com.ruoyi.test.service.TestService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/test") +public class BoxTestController { + @Autowired + private TestService testService; + @RequestMapping("test") + public String test(){ + testService.test(); + return testService.test(); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/FrForCrController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/FrForCrController.java new file mode 100644 index 000000000..29915a5e8 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/FrForCrController.java @@ -0,0 +1,45 @@ +package com.ruoyi.test.conrtroller; + +import com.ruoyi.test.service.OracleDdlService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.time.LocalTime; +import java.util.Map; + +@RestController +public class FrForCrController { + @Autowired + private OracleDdlService oracleDdlService; + + @CrossOrigin + @RequestMapping("/test/frforcr") + public void frforcr(@RequestBody Map map){ + for(Object value:map.values()){ + String dbName="ds7"; + String tableName=value.toString(); + String tableNameWithDb=dbName+"."+tableName; + int isTableInDb=oracleDdlService.isTableInDb(dbName,tableName); + if(isTableInDb>0){ + try{ + oracleDdlService.dropTable(tableNameWithDb); + System.out.println(LocalTime.now()+"【"+tableNameWithDb+"】已被删除!"); + }catch (Exception e){ + System.out.println(LocalTime.now()+"【"+tableNameWithDb+"】删除异常!"); + } + } + else{ + System.out.println(LocalTime.now()+"【"+tableNameWithDb+"】不存在!"); + } + } + + } + + + +} + + diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/GetJsonReqController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/GetJsonReqController.java new file mode 100644 index 000000000..e5ad72c9e --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/GetJsonReqController.java @@ -0,0 +1,67 @@ +package com.ruoyi.test.conrtroller; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.ruoyi.test.domain.Beauty; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.text.SimpleDateFormat; +import java.util.HashMap; +import java.util.Map; + +@RestController +@RequestMapping("/test") +public class GetJsonReqController { + + @CrossOrigin + @RequestMapping(value = "simple") + // json的结构和内部字段名称可以与POJO/DTO/javabean完全对应 + public Map getJsonBean(@RequestBody Beauty beauty) { + Map result = null; + + if (beauty != null) { + System.out.println("姓名:" + beauty.getName()); + System.out.println("年龄:" + beauty.getAge()); + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + System.out.println("出生日期:" + sdf.format(beauty.getDate())); + + System.out.println("年收入:" + beauty.getSalary()); + result = new HashMap<>(); + result.put("code", "1"); + result.put("msg", "ok"); + } + + return result; + } + + @CrossOrigin + @RequestMapping(value = "complex") + //json的结构较为复杂,不直接与POJO/DTO/javabean对应。 + public Map getJsonComplex(@RequestBody JSONObject param) { + Map result = null; + + if (param != null) { + JSONObject master = param.getJSONObject("master"); + Beauty beauty = (Beauty) JSONObject.toJavaObject(master, Beauty.class); + System.out.println(beauty); + + JSONArray mm = param.getJSONArray("MM"); + for (int i = 0; i < mm.size(); i++) { + // 这里不能使用get(i),因为get(i)只会得到键值对。 + JSONObject json = mm.getJSONObject(i); + Beauty bt = (Beauty) JSONObject.toJavaObject(json, Beauty.class); + System.out.println(bt); + } + + result = new HashMap<>(); + result.put("code", "1"); + result.put("msg", "ok"); + } + + return result; + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/OracleDdlController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/OracleDdlController.java new file mode 100644 index 000000000..5f0b67f56 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/OracleDdlController.java @@ -0,0 +1,55 @@ +package com.ruoyi.test.conrtroller; + +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.test.service.OracleDdlService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/test") +@DataSource(value = DataSourceType.SLAVE) +public class OracleDdlController { + @Autowired + private OracleDdlService oracleDdlService; + + //查询表录数 + @RequestMapping("getRecordCount") + + public String getRecordCount() { + String tableName = "tc_user"; + int result = oracleDdlService.getRecordCount(tableName); + return result + ""; + } + + //检查表是否存在 + @RequestMapping("isTableInDb") + public String isTableInDb() { + String dbName = "ds7"; + String tableName = "tc_user"; + return (oracleDdlService.isTableInDb(dbName, tableName)>0?"实例ds7中存在表tc_user":"实例ds7中不存在表tc_user"); + } + + //复制表 + @RequestMapping("copyTable") + public String copyTable() { + String originalTalble = "tc_user"; + String newTable = "new_tc_user"; + + if (oracleDdlService.isTableInDb("ds7", originalTalble) > 0) { + try { + oracleDdlService.copyTable(newTable, originalTalble); + return "复制" + originalTalble + "成功!新表名:" + newTable; + } catch (Exception e) { + System.out.println(e); + return "复制" + originalTalble + "失败!"; + } + } else { + return "表"+originalTalble+"不存在"; + + } + + } + +} diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/SendJsonController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/SendJsonController.java new file mode 100644 index 000000000..689d2ce84 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/SendJsonController.java @@ -0,0 +1,15 @@ +package com.ruoyi.test.conrtroller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + + +@Controller +public class SendJsonController { + @RequestMapping("/test/sendjson") + public String ajaxSend(){ + return ("test/sendJson"); + + } + +} diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/SysCustomerController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/SysCustomerController.java new file mode 100644 index 000000000..9e4b8e568 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/SysCustomerController.java @@ -0,0 +1,123 @@ +package com.ruoyi.test.conrtroller; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.test.domain.SysCustomer; +import com.ruoyi.test.service.ISysCustomerService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 客户Controller + * + * @author box + * @date 2021-02-13 + */ +@Controller +@RequestMapping("/test/customer") +public class SysCustomerController extends BaseController +{ + private String prefix = "test/customer"; + + @Autowired + private ISysCustomerService sysCustomerService; + + @RequiresPermissions("test:customer:view") + @GetMapping() + public String customer() + { + return prefix + "/customer"; + } + + /** + * 查询客户列表 + */ + @RequiresPermissions("test:customer:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysCustomer sysCustomer) + { + startPage(); + List list = sysCustomerService.selectSysCustomerList(sysCustomer); + return getDataTable(list); + } + + /** + * 导出客户列表 + */ + @RequiresPermissions("test:customer:export") + @Log(title = "客户", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysCustomer sysCustomer) + { + List list = sysCustomerService.selectSysCustomerList(sysCustomer); + ExcelUtil util = new ExcelUtil(SysCustomer.class); + return util.exportExcel(list, "customer"); + } + + /** + * 新增客户 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存客户 + */ + @RequiresPermissions("test:customer:add") + @Log(title = "客户", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysCustomer sysCustomer) + { + return toAjax(sysCustomerService.insertSysCustomer(sysCustomer)); + } + + /** + * 修改客户 + */ + @GetMapping("/edit/{customerId}") + public String edit(@PathVariable("customerId") Long customerId, ModelMap mmap) + { + SysCustomer sysCustomer = sysCustomerService.selectSysCustomerById(customerId); + mmap.put("sysCustomer", sysCustomer); + return prefix + "/edit"; + } + + /** + * 修改保存客户 + */ + @RequiresPermissions("test:customer:edit") + @Log(title = "客户", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysCustomer sysCustomer) + { + return toAjax(sysCustomerService.updateSysCustomer(sysCustomer)); + } + + /** + * 删除客户 + */ + @RequiresPermissions("test:customer:remove") + @Log(title = "客户", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysCustomerService.deleteSysCustomerByIds(ids)); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/SysFileInfoController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/SysFileInfoController.java new file mode 100644 index 000000000..e7a610ef5 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/SysFileInfoController.java @@ -0,0 +1,123 @@ +package com.ruoyi.test.conrtroller; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.test.domain.SysFileInfo; +import com.ruoyi.test.service.ISysFileInfoService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 文件信息Controller + * + * @author box + * @date 2021-05-06 + */ +@Controller +@RequestMapping("/test/fileinfo") +public class SysFileInfoController extends BaseController +{ + private String prefix = "test/fileinfo"; + + @Autowired + private ISysFileInfoService sysFileInfoService; + + @RequiresPermissions("test:fileinfo:view") + @GetMapping() + public String fileinfo() + { + return prefix + "/fileinfo"; + } + + /** + * 查询文件信息列表 + */ + @RequiresPermissions("test:fileinfo:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysFileInfo sysFileInfo) + { + startPage(); + List list = sysFileInfoService.selectSysFileInfoList(sysFileInfo); + return getDataTable(list); + } + + /** + * 导出文件信息列表 + */ + @RequiresPermissions("test:fileinfo:export") + @Log(title = "文件信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysFileInfo sysFileInfo) + { + List list = sysFileInfoService.selectSysFileInfoList(sysFileInfo); + ExcelUtil util = new ExcelUtil(SysFileInfo.class); + return util.exportExcel(list, "文件信息数据"); + } + + /** + * 新增文件信息 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存文件信息 + */ + @RequiresPermissions("test:fileinfo:add") + @Log(title = "文件信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysFileInfo sysFileInfo) + { + return toAjax(sysFileInfoService.insertSysFileInfo(sysFileInfo)); + } + + /** + * 修改文件信息 + */ + @GetMapping("/edit/{fileId}") + public String edit(@PathVariable("fileId") Long fileId, ModelMap mmap) + { + SysFileInfo sysFileInfo = sysFileInfoService.selectSysFileInfoById(fileId); + mmap.put("sysFileInfo", sysFileInfo); + return prefix + "/edit"; + } + + /** + * 修改保存文件信息 + */ + @RequiresPermissions("test:fileinfo:edit") + @Log(title = "文件信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysFileInfo sysFileInfo) + { + return toAjax(sysFileInfoService.updateSysFileInfo(sysFileInfo)); + } + + /** + * 删除文件信息 + */ + @RequiresPermissions("test:fileinfo:remove") + @Log(title = "文件信息", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysFileInfoService.deleteSysFileInfoByIds(ids)); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/TcUserController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/TcUserController.java new file mode 100644 index 000000000..55953e6fc --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/TcUserController.java @@ -0,0 +1,64 @@ +package com.ruoyi.test.conrtroller; + +import com.ruoyi.test.domain.TcUser; +import com.ruoyi.test.service.TcUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@RestController +@RequestMapping("/test") +public class TcUserController { + @Autowired + private TcUserService tcUserService; + + //查询所有 + // http://localhost/test/selectall + @RequestMapping("selectAll") + @ResponseBody + public String selectAll(){ + List users=tcUserService.selectAll(); + users.forEach(System.out::println); + return users.toString()+""; + } + + + //查询 by id + // http://localhost/test/selectById/1(此处1为要获取的id) + @RequestMapping(value = "selectById/{id}", method = RequestMethod.GET) + public String selectById(@PathVariable int id) { + return tcUserService.selectById(id).toString(); + } + + //插入新用户 + // http://localhost/test/insert?id=100&name=张三&password=20 + @RequestMapping(value = "/insert", method = RequestMethod.GET) + public TcUser insert(TcUser tcUser) { + return tcUserService.insert(tcUser); + } + + //通过用户id删除用户 + // http://localhost/test/deleteById?id=1(此处1为要删除的id) + @RequestMapping(value = "/deleteById", method = RequestMethod.GET) + public String delete(int id) { + int result = tcUserService.deleteById(id); + if (result >= 1) { + return "删除成功"; + } else { + return "删除失败"; + } + } + + //更新 by id + // http://localhost/test/updateById?id=2&name=波波&password=12 + @RequestMapping(value = "/updateById", method = RequestMethod.GET) + public String update(TcUser tcUser) { + int result = tcUserService.updateById(tcUser); + if (result >= 1) { + return "修改成功"; + } else { + return "修改失败"; + } + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/TestIndexController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/TestIndexController.java new file mode 100644 index 000000000..4900631cc --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/TestIndexController.java @@ -0,0 +1,16 @@ +package com.ruoyi.test.conrtroller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; + +import java.time.LocalDateTime; + +@Controller +public class TestIndexController { + @RequestMapping("/test") + public String index(ModelMap modelMap){ + modelMap.put("date", LocalDateTime.now()); + return ("test/index"); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/conrtroller/TestVerifyController.java b/box-test/src/main/java/com/ruoyi/test/conrtroller/TestVerifyController.java new file mode 100644 index 000000000..f2d3c63f1 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/conrtroller/TestVerifyController.java @@ -0,0 +1,34 @@ +package com.ruoyi.test.conrtroller; + +import com.ruoyi.test.service.TestVerifyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class TestVerifyController { + @Autowired + private TestVerifyService testVerifyService; + + @RequestMapping("/test/testVerify") + public String testVerify(){ + return "/test/testVerify"; + } + + + + + /** + * 校验用户名 + */ + + @PostMapping("/test/testVerifyName") + @ResponseBody + public int testVerifyName(String name) + { + return testVerifyService.isNameUnique(name); + } + +} diff --git a/box-test/src/main/java/com/ruoyi/test/domain/Beauty.java b/box-test/src/main/java/com/ruoyi/test/domain/Beauty.java new file mode 100644 index 000000000..41c2ec760 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/domain/Beauty.java @@ -0,0 +1,55 @@ +package com.ruoyi.test.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.util.Date; + +public class Beauty { + private String name; + private int age; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date date; + private double salary; + + public Beauty() { + + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + public double getSalary() { + return salary; + } + + public void setSalary(double salary) { + this.salary = salary; + } + + @Override + public String toString() { + return "Beauty [name=" + name + ", age=" + age + ", date=" + date + ", salary=" + salary + "]"; + } + +} diff --git a/box-test/src/main/java/com/ruoyi/test/domain/SysCustomer.java b/box-test/src/main/java/com/ruoyi/test/domain/SysCustomer.java new file mode 100644 index 000000000..0f34bbe05 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/domain/SysCustomer.java @@ -0,0 +1,113 @@ +package com.ruoyi.test.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; +import java.util.List; + +/** + * 客户对象 sys_customer + * + * @author box + * @date 2021-02-13 + */ +public class SysCustomer extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 客户id */ + private Long customerId; + + /** 客户姓名 */ + @Excel(name = "客户姓名") + private String customerName; + + /** 手机号码 */ + @Excel(name = "手机号码") + private String phonenumber; + + /** 客户性别 */ + @Excel(name = "客户性别") + private String sex; + + /** 客户生日 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "客户生日", width = 30, dateFormat = "yyyy-MM-dd") + private Date birthday; + + /** 商品信息 */ + private List sysGoodsList; + + public void setCustomerId(Long customerId) + { + this.customerId = customerId; + } + + public Long getCustomerId() + { + return customerId; + } + public void setCustomerName(String customerName) + { + this.customerName = customerName; + } + + public String getCustomerName() + { + return customerName; + } + public void setPhonenumber(String phonenumber) + { + this.phonenumber = phonenumber; + } + + public String getPhonenumber() + { + return phonenumber; + } + public void setSex(String sex) + { + this.sex = sex; + } + + public String getSex() + { + return sex; + } + public void setBirthday(Date birthday) + { + this.birthday = birthday; + } + + public Date getBirthday() + { + return birthday; + } + + public List getSysGoodsList() + { + return sysGoodsList; + } + + public void setSysGoodsList(List sysGoodsList) + { + this.sysGoodsList = sysGoodsList; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("customerId", getCustomerId()) + .append("customerName", getCustomerName()) + .append("phonenumber", getPhonenumber()) + .append("sex", getSex()) + .append("birthday", getBirthday()) + .append("remark", getRemark()) + .append("sysGoodsList", getSysGoodsList()) + .toString(); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/domain/SysFileInfo.java b/box-test/src/main/java/com/ruoyi/test/domain/SysFileInfo.java new file mode 100644 index 000000000..003c5f57a --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/domain/SysFileInfo.java @@ -0,0 +1,65 @@ +package com.ruoyi.test.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 文件信息对象 sys_file_info + * + * @author box + * @date 2021-05-06 + */ +public class SysFileInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 文件id */ + private Long fileId; + + /** 文件名称 */ + @Excel(name = "文件名称") + private String fileName; + + /** 文件路径 */ + @Excel(name = "文件路径") + private String filePath; + + public void setFileId(Long fileId) + { + this.fileId = fileId; + } + + public Long getFileId() + { + return fileId; + } + public void setFileName(String fileName) + { + this.fileName = fileName; + } + + public String getFileName() + { + return fileName; + } + public void setFilePath(String filePath) + { + this.filePath = filePath; + } + + public String getFilePath() + { + return filePath; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("fileId", getFileId()) + .append("fileName", getFileName()) + .append("filePath", getFilePath()) + .toString(); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/domain/SysGoods.java b/box-test/src/main/java/com/ruoyi/test/domain/SysGoods.java new file mode 100644 index 000000000..85740959a --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/domain/SysGoods.java @@ -0,0 +1,124 @@ +package com.ruoyi.test.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 商品对象 sys_goods + * + * @author box + * @date 2021-02-13 + */ +public class SysGoods extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 商品id */ + private Long goodsId; + + /** 客户id */ + @Excel(name = "客户id") + private Long customerId; + + /** 商品名称 */ + @Excel(name = "商品名称") + private String name; + + /** 商品重量 */ + @Excel(name = "商品重量") + private Integer weight; + + /** 商品价格 */ + @Excel(name = "商品价格") + private BigDecimal price; + + /** 商品时间 */ + @Excel(name = "商品时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date date; + + /** 商品种类 */ + @Excel(name = "商品种类") + private String type; + + public void setGoodsId(Long goodsId) + { + this.goodsId = goodsId; + } + + public Long getGoodsId() + { + return goodsId; + } + public void setCustomerId(Long customerId) + { + this.customerId = customerId; + } + + public Long getCustomerId() + { + return customerId; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setWeight(Integer weight) + { + this.weight = weight; + } + + public Integer getWeight() + { + return weight; + } + public void setPrice(BigDecimal price) + { + this.price = price; + } + + public BigDecimal getPrice() + { + return price; + } + public void setDate(Date date) + { + this.date = date; + } + + public Date getDate() + { + return date; + } + public void setType(String type) + { + this.type = type; + } + + public String getType() + { + return type; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("goodsId", getGoodsId()) + .append("customerId", getCustomerId()) + .append("name", getName()) + .append("weight", getWeight()) + .append("price", getPrice()) + .append("date", getDate()) + .append("type", getType()) + .toString(); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/domain/TcUser.java b/box-test/src/main/java/com/ruoyi/test/domain/TcUser.java new file mode 100644 index 000000000..da8a2d3cc --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/domain/TcUser.java @@ -0,0 +1,40 @@ +package com.ruoyi.test.domain; + +public class TcUser { + private int id; + private String name; + private String password; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public String toString() { + return "TcUser{" + + "id=" + id + + ", name='" + name + '\'' + + ", age='" + password + '\'' + + '}'; + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/mapper/OracleDdlMapper.java b/box-test/src/main/java/com/ruoyi/test/mapper/OracleDdlMapper.java new file mode 100644 index 000000000..e7c2f3a16 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/mapper/OracleDdlMapper.java @@ -0,0 +1,32 @@ +package com.ruoyi.test.mapper; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +@Mapper +@Component("OracleDdlMapper") +public interface OracleDdlMapper { + // alter table + int alterTableName(@Param("originalTableName") String originalTableName, + @Param("newTableName") String newTableName); + + //truncate table + int truncateTable(@Param("tableName") String tableName); + + //drop table + int dropTable(@Param("tableName") String tableName); + + //copy table + void copyTable(@Param("newTableName") String newTableName, + @Param("originalTableName") String originalTableName); + + //获取表记录数 + int getRecordCount(@Param("tableName") String tableName); + + + + //查询数据库中表是否存在 + int isTableInDb(@Param("dataBaseName") String dataBaseName, + @Param("tableName") String tableName); +} diff --git a/box-test/src/main/java/com/ruoyi/test/mapper/SysCustomerMapper.java b/box-test/src/main/java/com/ruoyi/test/mapper/SysCustomerMapper.java new file mode 100644 index 000000000..3ae177354 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/mapper/SysCustomerMapper.java @@ -0,0 +1,88 @@ +package com.ruoyi.test.mapper; + +import com.ruoyi.test.domain.SysCustomer; +import com.ruoyi.test.domain.SysGoods; + +import java.util.List; + +/** + * 客户Mapper接口 + * + * @author box + * @date 2021-02-13 + */ +public interface SysCustomerMapper +{ + /** + * 查询客户 + * + * @param customerId 客户ID + * @return 客户 + */ + public SysCustomer selectSysCustomerById(Long customerId); + + /** + * 查询客户列表 + * + * @param sysCustomer 客户 + * @return 客户集合 + */ + public List selectSysCustomerList(SysCustomer sysCustomer); + + /** + * 新增客户 + * + * @param sysCustomer 客户 + * @return 结果 + */ + public int insertSysCustomer(SysCustomer sysCustomer); + + /** + * 修改客户 + * + * @param sysCustomer 客户 + * @return 结果 + */ + public int updateSysCustomer(SysCustomer sysCustomer); + + /** + * 删除客户 + * + * @param customerId 客户ID + * @return 结果 + */ + public int deleteSysCustomerById(Long customerId); + + /** + * 批量删除客户 + * + * @param customerIds 需要删除的数据ID + * @return 结果 + */ + public int deleteSysCustomerByIds(String[] customerIds); + + /** + * 批量删除商品 + * + * @param customerIds 需要删除的数据ID + * @return 结果 + */ + public int deleteSysGoodsByCustomerIds(String[] customerIds); + + /** + * 批量新增商品 + * + * @param sysGoodsList 商品列表 + * @return 结果 + */ + public int batchSysGoods(List sysGoodsList); + + + /** + * 通过客户ID删除商品信息 + * + * @param roleId 角色ID + * @return 结果 + */ + public int deleteSysGoodsByCustomerId(Long customerId); +} diff --git a/box-test/src/main/java/com/ruoyi/test/mapper/SysFileInfoMapper.java b/box-test/src/main/java/com/ruoyi/test/mapper/SysFileInfoMapper.java new file mode 100644 index 000000000..923f598cf --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/mapper/SysFileInfoMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.test.mapper; + +import com.ruoyi.test.domain.SysFileInfo; + +import java.util.List; + +/** + * 文件信息Mapper接口 + * + * @author box + * @date 2021-05-06 + */ +public interface SysFileInfoMapper +{ + /** + * 查询文件信息 + * + * @param fileId 文件信息ID + * @return 文件信息 + */ + public SysFileInfo selectSysFileInfoById(Long fileId); + + /** + * 查询文件信息列表 + * + * @param sysFileInfo 文件信息 + * @return 文件信息集合 + */ + public List selectSysFileInfoList(SysFileInfo sysFileInfo); + + /** + * 新增文件信息 + * + * @param sysFileInfo 文件信息 + * @return 结果 + */ + public int insertSysFileInfo(SysFileInfo sysFileInfo); + + /** + * 修改文件信息 + * + * @param sysFileInfo 文件信息 + * @return 结果 + */ + public int updateSysFileInfo(SysFileInfo sysFileInfo); + + /** + * 删除文件信息 + * + * @param fileId 文件信息ID + * @return 结果 + */ + public int deleteSysFileInfoById(Long fileId); + + /** + * 批量删除文件信息 + * + * @param fileIds 需要删除的数据ID + * @return 结果 + */ + public int deleteSysFileInfoByIds(String[] fileIds); +} diff --git a/box-test/src/main/java/com/ruoyi/test/mapper/TcUserMapper.java b/box-test/src/main/java/com/ruoyi/test/mapper/TcUserMapper.java new file mode 100644 index 000000000..39f541866 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/mapper/TcUserMapper.java @@ -0,0 +1,26 @@ +package com.ruoyi.test.mapper; + +import com.ruoyi.test.domain.TcUser; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Mapper +@Component("TCUserMapper") +public interface TcUserMapper { + //查询所有 + List selectAll(); + + //查询 by id + TcUser selectById(int id); + + //增加 + int insert(TcUser tcUser); + + //删除 by id + int deleteById(int id); + + //更新 by id + int updateById(TcUser tcUser); +} diff --git a/box-test/src/main/java/com/ruoyi/test/mapper/TestVerifyMapper.java b/box-test/src/main/java/com/ruoyi/test/mapper/TestVerifyMapper.java new file mode 100644 index 000000000..36327dd82 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/mapper/TestVerifyMapper.java @@ -0,0 +1,11 @@ +package com.ruoyi.test.mapper; + +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Component; + +@Mapper +@Component("TestVerifyMapper") +public interface TestVerifyMapper { + //检查姓名是否唯一 + int isNameUnique(String name); +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/ISysCustomerService.java b/box-test/src/main/java/com/ruoyi/test/service/ISysCustomerService.java new file mode 100644 index 000000000..4a3aafa4d --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/ISysCustomerService.java @@ -0,0 +1,62 @@ +package com.ruoyi.test.service; + +import com.ruoyi.test.domain.SysCustomer; + +import java.util.List; + +/** + * 客户Service接口 + * + * @author box + * @date 2021-02-13 + */ +public interface ISysCustomerService +{ + /** + * 查询客户 + * + * @param customerId 客户ID + * @return 客户 + */ + public SysCustomer selectSysCustomerById(Long customerId); + + /** + * 查询客户列表 + * + * @param sysCustomer 客户 + * @return 客户集合 + */ + public List selectSysCustomerList(SysCustomer sysCustomer); + + /** + * 新增客户 + * + * @param sysCustomer 客户 + * @return 结果 + */ + public int insertSysCustomer(SysCustomer sysCustomer); + + /** + * 修改客户 + * + * @param sysCustomer 客户 + * @return 结果 + */ + public int updateSysCustomer(SysCustomer sysCustomer); + + /** + * 批量删除客户 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysCustomerByIds(String ids); + + /** + * 删除客户信息 + * + * @param customerId 客户ID + * @return 结果 + */ + public int deleteSysCustomerById(Long customerId); +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/ISysFileInfoService.java b/box-test/src/main/java/com/ruoyi/test/service/ISysFileInfoService.java new file mode 100644 index 000000000..7df14d3ac --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/ISysFileInfoService.java @@ -0,0 +1,62 @@ +package com.ruoyi.test.service; + +import com.ruoyi.test.domain.SysFileInfo; + +import java.util.List; + +/** + * 文件信息Service接口 + * + * @author box + * @date 2021-05-06 + */ +public interface ISysFileInfoService +{ + /** + * 查询文件信息 + * + * @param fileId 文件信息ID + * @return 文件信息 + */ + public SysFileInfo selectSysFileInfoById(Long fileId); + + /** + * 查询文件信息列表 + * + * @param sysFileInfo 文件信息 + * @return 文件信息集合 + */ + public List selectSysFileInfoList(SysFileInfo sysFileInfo); + + /** + * 新增文件信息 + * + * @param sysFileInfo 文件信息 + * @return 结果 + */ + public int insertSysFileInfo(SysFileInfo sysFileInfo); + + /** + * 修改文件信息 + * + * @param sysFileInfo 文件信息 + * @return 结果 + */ + public int updateSysFileInfo(SysFileInfo sysFileInfo); + + /** + * 批量删除文件信息 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysFileInfoByIds(String ids); + + /** + * 删除文件信息信息 + * + * @param fileId 文件信息ID + * @return 结果 + */ + public int deleteSysFileInfoById(Long fileId); +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/OracleDdlService.java b/box-test/src/main/java/com/ruoyi/test/service/OracleDdlService.java new file mode 100644 index 000000000..e6b5b6200 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/OracleDdlService.java @@ -0,0 +1,22 @@ +package com.ruoyi.test.service; + +public interface OracleDdlService { + //修改表名 + int alterTableName(String originalTableName, String newTableName); + + // truncate指定数据库表的数据 + int truncateTable(String tableName); + + //drop 指定定数据库表 + int dropTable(String tableName); + + + //根据传入的表明,创建新的表并且将原表的数据插入到新的Occur表中 + void copyTable(String newTableName,String originalTableName); + + //统计某张表中的总数据条数 + int getRecordCount(String tableName); + + //从指定数据库中,查询是否存在某张表 + int isTableInDb(String dataBaseName, String tableName); +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/TcUserService.java b/box-test/src/main/java/com/ruoyi/test/service/TcUserService.java new file mode 100644 index 000000000..2f32e20cd --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/TcUserService.java @@ -0,0 +1,22 @@ +package com.ruoyi.test.service; + +import com.ruoyi.test.domain.TcUser; + +import java.util.List; + +public interface TcUserService { + //查询所有用户 + List selectAll(); + + //根据id查询用户信息 + TcUser selectById(int id); + + //新增用户 + TcUser insert (TcUser tcUser); + + // 根据id删除 + int deleteById (int id); + + //更新用户信息 + int updateById(TcUser tcUser); +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/TestService.java b/box-test/src/main/java/com/ruoyi/test/service/TestService.java new file mode 100644 index 000000000..8b6b40b97 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/TestService.java @@ -0,0 +1,10 @@ +package com.ruoyi.test.service; + +import org.springframework.stereotype.Service; + +@Service +public class TestService { + public String test(){ + return "hello,box-test.test"; + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/TestVerifyService.java b/box-test/src/main/java/com/ruoyi/test/service/TestVerifyService.java new file mode 100644 index 000000000..6f6e9b0b4 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/TestVerifyService.java @@ -0,0 +1,9 @@ +package com.ruoyi.test.service; + +import org.springframework.stereotype.Service; + +@Service +public interface TestVerifyService { + //检查姓名是否唯一 + int isNameUnique(String name); +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/impl/OracleDdlServiceImpl.java b/box-test/src/main/java/com/ruoyi/test/service/impl/OracleDdlServiceImpl.java new file mode 100644 index 000000000..1ebf0b930 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/impl/OracleDdlServiceImpl.java @@ -0,0 +1,45 @@ +package com.ruoyi.test.service.impl; + +import com.ruoyi.test.mapper.OracleDdlMapper; +import com.ruoyi.test.service.OracleDdlService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +//@DataSource(value = DataSourceType.SLAVE) +public class OracleDdlServiceImpl implements OracleDdlService { + @Autowired + private OracleDdlMapper oracleDdlMapper; + + //修改表名 + public int alterTableName(String originalTableName, String newTableName) + { + return oracleDdlMapper.alterTableName(originalTableName,newTableName); + } + + // truncate指定数据库表的数据 + public int truncateTable(String tableName){ + return oracleDdlMapper.truncateTable(tableName); + } + + //drop 指定定数据库表 + public int dropTable(String tableName){ + return oracleDdlMapper.dropTable(tableName); + } + + + //根据传入的表明,创建新的表并且将原表的数据插入到新的Occur表中 + public void copyTable(String newTableName,String originalTableName){ + return ; + } + + //统计某张表中的总数据条数 + public int getRecordCount(String tableName){ + return oracleDdlMapper.getRecordCount(tableName); + } + + //从指定数据库中,查询是否存在某张表 + public int isTableInDb(String dataBaseName, String tableName){ + return oracleDdlMapper.isTableInDb(dataBaseName,tableName); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/impl/SysCustomerServiceImpl.java b/box-test/src/main/java/com/ruoyi/test/service/impl/SysCustomerServiceImpl.java new file mode 100644 index 000000000..a7d13ef6b --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/impl/SysCustomerServiceImpl.java @@ -0,0 +1,132 @@ +package com.ruoyi.test.service.impl; + +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.test.domain.SysCustomer; +import com.ruoyi.test.domain.SysGoods; +import com.ruoyi.test.mapper.SysCustomerMapper; +import com.ruoyi.test.service.ISysCustomerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.List; + +/** + * 客户Service业务层处理 + * + * @author box + * @date 2021-02-13 + */ +@Service +public class SysCustomerServiceImpl implements ISysCustomerService +{ + @Autowired + private SysCustomerMapper sysCustomerMapper; + + /** + * 查询客户 + * + * @param customerId 客户ID + * @return 客户 + */ + @Override + public SysCustomer selectSysCustomerById(Long customerId) + { + return sysCustomerMapper.selectSysCustomerById(customerId); + } + + /** + * 查询客户列表 + * + * @param sysCustomer 客户 + * @return 客户 + */ + @Override + public List selectSysCustomerList(SysCustomer sysCustomer) + { + return sysCustomerMapper.selectSysCustomerList(sysCustomer); + } + + /** + * 新增客户 + * + * @param sysCustomer 客户 + * @return 结果 + */ + @Transactional + @Override + public int insertSysCustomer(SysCustomer sysCustomer) + { + int rows = sysCustomerMapper.insertSysCustomer(sysCustomer); + insertSysGoods(sysCustomer); + return rows; + } + + /** + * 修改客户 + * + * @param sysCustomer 客户 + * @return 结果 + */ + @Transactional + @Override + public int updateSysCustomer(SysCustomer sysCustomer) + { + sysCustomerMapper.deleteSysGoodsByCustomerId(sysCustomer.getCustomerId()); + insertSysGoods(sysCustomer); + return sysCustomerMapper.updateSysCustomer(sysCustomer); + } + + /** + * 删除客户对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Transactional + @Override + public int deleteSysCustomerByIds(String ids) + { + sysCustomerMapper.deleteSysGoodsByCustomerIds(Convert.toStrArray(ids)); + return sysCustomerMapper.deleteSysCustomerByIds(Convert.toStrArray(ids)); + } + + /** + * 删除客户信息 + * + * @param customerId 客户ID + * @return 结果 + */ + @Override + public int deleteSysCustomerById(Long customerId) + { + sysCustomerMapper.deleteSysGoodsByCustomerId(customerId); + return sysCustomerMapper.deleteSysCustomerById(customerId); + } + + /** + * 新增商品信息 + * + * @param sysCustomer 客户对象 + */ + public void insertSysGoods(SysCustomer sysCustomer) + { + List sysGoodsList = sysCustomer.getSysGoodsList(); + Long customerId = sysCustomer.getCustomerId(); + if (StringUtils.isNotNull(sysGoodsList)) + { + List list = new ArrayList(); + for (SysGoods sysGoods : sysGoodsList) + { + sysGoods.setCustomerId(customerId); + list.add(sysGoods); + } + if (list.size() > 0) + { + sysCustomerMapper.batchSysGoods(list); + } + } + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/impl/SysFileInfoServiceImpl.java b/box-test/src/main/java/com/ruoyi/test/service/impl/SysFileInfoServiceImpl.java new file mode 100644 index 000000000..a7407bbce --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/impl/SysFileInfoServiceImpl.java @@ -0,0 +1,95 @@ +package com.ruoyi.test.service.impl; + +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.test.domain.SysFileInfo; +import com.ruoyi.test.mapper.SysFileInfoMapper; +import com.ruoyi.test.service.ISysFileInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 文件信息Service业务层处理 + * + * @author box + * @date 2021-05-06 + */ +@Service +public class SysFileInfoServiceImpl implements ISysFileInfoService +{ + @Autowired + private SysFileInfoMapper sysFileInfoMapper; + + /** + * 查询文件信息 + * + * @param fileId 文件信息ID + * @return 文件信息 + */ + @Override + public SysFileInfo selectSysFileInfoById(Long fileId) + { + return sysFileInfoMapper.selectSysFileInfoById(fileId); + } + + /** + * 查询文件信息列表 + * + * @param sysFileInfo 文件信息 + * @return 文件信息 + */ + @Override + public List selectSysFileInfoList(SysFileInfo sysFileInfo) + { + return sysFileInfoMapper.selectSysFileInfoList(sysFileInfo); + } + + /** + * 新增文件信息 + * + * @param sysFileInfo 文件信息 + * @return 结果 + */ + @Override + public int insertSysFileInfo(SysFileInfo sysFileInfo) + { + return sysFileInfoMapper.insertSysFileInfo(sysFileInfo); + } + + /** + * 修改文件信息 + * + * @param sysFileInfo 文件信息 + * @return 结果 + */ + @Override + public int updateSysFileInfo(SysFileInfo sysFileInfo) + { + return sysFileInfoMapper.updateSysFileInfo(sysFileInfo); + } + + /** + * 删除文件信息对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSysFileInfoByIds(String ids) + { + return sysFileInfoMapper.deleteSysFileInfoByIds(Convert.toStrArray(ids)); + } + + /** + * 删除文件信息信息 + * + * @param fileId 文件信息ID + * @return 结果 + */ + @Override + public int deleteSysFileInfoById(Long fileId) + { + return sysFileInfoMapper.deleteSysFileInfoById(fileId); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/impl/TcUserServiceImpl.java b/box-test/src/main/java/com/ruoyi/test/service/impl/TcUserServiceImpl.java new file mode 100644 index 000000000..ca691ce98 --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/impl/TcUserServiceImpl.java @@ -0,0 +1,48 @@ +package com.ruoyi.test.service.impl; + +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.test.domain.TcUser; +import com.ruoyi.test.mapper.TcUserMapper; +import com.ruoyi.test.service.TcUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +@DataSource(value = DataSourceType.SQLSVR) +public class TcUserServiceImpl implements TcUserService { + @Autowired + private TcUserMapper tcUserMapper; + + //查询所有用户 + @Override + public List selectAll() { + return tcUserMapper.selectAll(); + } + + //查询 by id + @Override + public TcUser selectById(int id) { + return tcUserMapper.selectById(id); + } + + //新增 + @Override + public TcUser insert(TcUser tcUser) { + int user=tcUserMapper.insert(tcUser); + return tcUser; + } + + //删除by id + @Override + public int deleteById(int id) { + return tcUserMapper.deleteById(id); + } + //更新 by id + @Override + public int updateById(TcUser tcUser) { + return tcUserMapper.updateById(tcUser); + } +} diff --git a/box-test/src/main/java/com/ruoyi/test/service/impl/TestVerifyServiceImpl.java b/box-test/src/main/java/com/ruoyi/test/service/impl/TestVerifyServiceImpl.java new file mode 100644 index 000000000..0293b1c6d --- /dev/null +++ b/box-test/src/main/java/com/ruoyi/test/service/impl/TestVerifyServiceImpl.java @@ -0,0 +1,19 @@ +package com.ruoyi.test.service.impl; + +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.test.mapper.TestVerifyMapper; +import com.ruoyi.test.service.TestVerifyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +@DataSource(value = DataSourceType.SQLSVR) +public class TestVerifyServiceImpl implements TestVerifyService { + @Autowired + private TestVerifyMapper testVerifyMapper; + @Override + public int isNameUnique(String name) { + return testVerifyMapper.isNameUnique(name); + } +} diff --git a/box-test/src/main/resources/mapper/test/OracleDdlMapper.xml b/box-test/src/main/resources/mapper/test/OracleDdlMapper.xml new file mode 100644 index 000000000..08cb35d57 --- /dev/null +++ b/box-test/src/main/resources/mapper/test/OracleDdlMapper.xml @@ -0,0 +1,29 @@ + + + + + + alter table ${originalTableName} rename ${newTableName} + + + + truncate table ${tableName} + + + + drop table ${tableName} + + + + create table ${newTableName} as select * from ${originalTableName} + + + + + + + \ No newline at end of file diff --git a/box-test/src/main/resources/mapper/test/SysCustomerMapper.xml b/box-test/src/main/resources/mapper/test/SysCustomerMapper.xml new file mode 100644 index 000000000..d4e97c0b1 --- /dev/null +++ b/box-test/src/main/resources/mapper/test/SysCustomerMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select customer_id, customer_name, phonenumber, sex, birthday, remark from sys_customer + + + + + + + + insert into sys_customer + + customer_name, + phonenumber, + sex, + birthday, + remark, + + + #{customerName}, + #{phonenumber}, + #{sex}, + #{birthday}, + #{remark}, + + + + + update sys_customer + + customer_name = #{customerName}, + phonenumber = #{phonenumber}, + sex = #{sex}, + birthday = #{birthday}, + remark = #{remark}, + + where customer_id = #{customerId} + + + + delete from sys_customer where customer_id = #{customerId} + + + + delete from sys_customer where customer_id in + + #{customerId} + + + + + delete from sys_goods where customer_id in + + #{customerId} + + + + + delete from sys_goods where customer_id = #{customerId} + + + + insert into sys_goods( goods_id, customer_id, name, weight, price, date, type) values + + ( #{item.goodsId}, #{item.customerId}, #{item.name}, #{item.weight}, #{item.price}, #{item.date}, #{item.type}) + + + + \ No newline at end of file diff --git a/box-test/src/main/resources/mapper/test/SysFileInfoMapper.xml b/box-test/src/main/resources/mapper/test/SysFileInfoMapper.xml new file mode 100644 index 000000000..1fa4beeac --- /dev/null +++ b/box-test/src/main/resources/mapper/test/SysFileInfoMapper.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + select file_id, file_name, file_path from sys_file_info + + + + + + + + insert into sys_file_info + + file_name, + file_path, + + + #{fileName}, + #{filePath}, + + + + + update sys_file_info + + file_name = #{fileName}, + file_path = #{filePath}, + + where file_id = #{fileId} + + + + delete from sys_file_info where file_id = #{fileId} + + + + delete from sys_file_info where file_id in + + #{fileId} + + + + \ No newline at end of file diff --git a/box-test/src/main/resources/mapper/test/TcUserMapper.xml b/box-test/src/main/resources/mapper/test/TcUserMapper.xml new file mode 100644 index 000000000..ee5f415f7 --- /dev/null +++ b/box-test/src/main/resources/mapper/test/TcUserMapper.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + insert into tc_user + + + id, + + + name, + + + password, + + + + + #{id,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + + + + + delete from tc_user where id=#{id} + + + + + update tc_user + + + name = #{name,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/box-test/src/main/resources/mapper/test/TestVerifyMapper.xml b/box-test/src/main/resources/mapper/test/TestVerifyMapper.xml new file mode 100644 index 000000000..9995edb00 --- /dev/null +++ b/box-test/src/main/resources/mapper/test/TestVerifyMapper.xml @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/box-test/src/main/resources/templates/test/customer/add.html b/box-test/src/main/resources/templates/test/customer/add.html new file mode 100644 index 000000000..c22d83716 --- /dev/null +++ b/box-test/src/main/resources/templates/test/customer/add.html @@ -0,0 +1,167 @@ + + + + + + + +
+
+

客户信息

+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+

商品信息

+
+
+ + +
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/box-test/src/main/resources/templates/test/customer/customer.html b/box-test/src/main/resources/templates/test/customer/customer.html new file mode 100644 index 000000000..484e01d18 --- /dev/null +++ b/box-test/src/main/resources/templates/test/customer/customer.html @@ -0,0 +1,117 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/box-test/src/main/resources/templates/test/customer/edit.html b/box-test/src/main/resources/templates/test/customer/edit.html new file mode 100644 index 000000000..41c5e9093 --- /dev/null +++ b/box-test/src/main/resources/templates/test/customer/edit.html @@ -0,0 +1,186 @@ + + + + + + + + +
+
+

客户信息

+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+

商品信息

+
+
+ + +
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/box-test/src/main/resources/templates/test/fileinfo/add.html b/box-test/src/main/resources/templates/test/fileinfo/add.html new file mode 100644 index 000000000..a3a91273a --- /dev/null +++ b/box-test/src/main/resources/templates/test/fileinfo/add.html @@ -0,0 +1,37 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/box-test/src/main/resources/templates/test/fileinfo/edit.html b/box-test/src/main/resources/templates/test/fileinfo/edit.html new file mode 100644 index 000000000..3d7f13c34 --- /dev/null +++ b/box-test/src/main/resources/templates/test/fileinfo/edit.html @@ -0,0 +1,38 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/box-test/src/main/resources/templates/test/fileinfo/fileinfo.html b/box-test/src/main/resources/templates/test/fileinfo/fileinfo.html new file mode 100644 index 000000000..a4b81a52c --- /dev/null +++ b/box-test/src/main/resources/templates/test/fileinfo/fileinfo.html @@ -0,0 +1,94 @@ + + + + + + +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/box-test/src/main/resources/templates/test/index.html b/box-test/src/main/resources/templates/test/index.html new file mode 100644 index 000000000..4b05e873e --- /dev/null +++ b/box-test/src/main/resources/templates/test/index.html @@ -0,0 +1,33 @@ + + + + + BPS后台管理系统-测试首页 + + +

BPS后台管理系统-测试首页



+一、Mybaits配置DML测试-Oracle(第二数据源) +
  • 查询所有用户
  • +
  • 新增ID为1000的用户
  • +
  • 根据ID查询用户,查询id=1000的用户
  • +
  • 修改用户为1000的用户姓名为Xia
  • +
  • 删除ID为1000的用户
  • + +

    +二、Mybaits配置DDL测试-Oracle +
  • 查询表中的记录数
  • +
  • 查询tc_user是否存在
  • +

    +Ajax发送获取Json配置测试 +

    +二、输入后验证测试 + +

  • 验证数据表中是否有记录
  • +

    + + +三、当前系统时间 + + + + \ No newline at end of file diff --git a/box-test/src/main/resources/templates/test/sendJson.html b/box-test/src/main/resources/templates/test/sendJson.html new file mode 100644 index 000000000..9c01a77e4 --- /dev/null +++ b/box-test/src/main/resources/templates/test/sendJson.html @@ -0,0 +1,99 @@ + + + + + 发送json + + + + + + +
    +


    + +
    +
    + + + diff --git a/box-test/src/main/resources/templates/test/testVerify.html b/box-test/src/main/resources/templates/test/testVerify.html new file mode 100644 index 000000000..b58ae6111 --- /dev/null +++ b/box-test/src/main/resources/templates/test/testVerify.html @@ -0,0 +1,65 @@ + + + + + + +
    +
    +
    +
    用户名: + + +
    + +
    +
    +
    + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 39b46e9ec..403d891cf 100644 --- a/pom.xml +++ b/pom.xml @@ -229,6 +229,20 @@ ${ruoyi.version} + + + com.ruoyi + box-test + ${ruoyi.version} + + + + + com.ruoyi + box-bps + ${ruoyi.version} + + @@ -239,6 +253,8 @@ ruoyi-quartz ruoyi-generator ruoyi-common + box-test + box-bps pom diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index bec326bca..b6225cc6d 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -8,7 +8,7 @@ 4.6.1 4.0.0 - jar + war ruoyi-admin @@ -61,6 +61,21 @@ mysql-connector-java + + + + com.oracle.database.jdbc + ojdbc6 + 11.2.0.4 + + + + + com.microsoft.sqlserver + mssql-jdbc + 8.4.1.jre8 + + com.ruoyi @@ -79,6 +94,18 @@ ruoyi-generator + + + com.ruoyi + box-test + + + + + com.ruoyi + box-bps + + diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 3c46fd50b..0c7535d6b 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -2,20 +2,48 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource - driverClassName: com.mysql.cj.jdbc.Driver + #driverClassName: com.mysql.cj.jdbc.Driver druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://192.168.2.18:3306/bps?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: password + password: abc.123 # 从库数据源 slave: # 从数据源开关/默认关闭 - enabled: false - url: - username: - password: + enabled: true + url: jdbc:oracle:thin:@192.168.2.91:1521/toptest + username: ds7 + password: ds7 + driverClassName: oracle.jdbc.driver.OracleDriver + #SQlServer数据源 + sqlsvr: + # 从数据源开关/默认关闭 + enabled: true + url: jdbc:sqlserver://192.168.2.84:1433;SelectMethod=cursor;DatabaseName=ITDemo + username: sa + password: abc.123 + driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver + + # Topprod_ds_report + topproddsreport: + # 从数据源开关/默认关闭 + enabled: true + url: jdbc:oracle:thin:@192.168.2.91:1521/topprod + username: ds_report + password: ds_report + driverClassName: oracle.jdbc.driver.OracleDriver + + # Toptest_ds_report + toptestdsreport: + # 从数据源开关/默认关闭 + enabled: true + url: jdbc:oracle:thin:@192.168.2.91:1521/toptest + username: ds_report + password: ds_report + driverClassName: oracle.jdbc.driver.OracleDriver + # 初始连接数 initialSize: 5 # 最小连接池数量 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 764a13fd2..05a0bbb5c 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -9,7 +9,7 @@ ruoyi: # 实例演示开关 demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: D:/ruoyi/uploadPath + profile: C:/bps-it/uploadPath # 获取ip地址开关 addressEnabled: false @@ -19,7 +19,7 @@ server: port: 80 servlet: # 应用的访问路径 - context-path: / + context-path: /it_war tomcat: # tomcat的URI编码 uri-encoding: UTF-8 @@ -96,7 +96,7 @@ shiro: # 首页地址 indexUrl: /index # 验证码开关 - captchaEnabled: true + captchaEnabled: false # 验证码类型 math 数组计算 char 字符 captchaType: math cookie: diff --git a/ruoyi-admin/src/main/resources/templates/index-topnav.html b/ruoyi-admin/src/main/resources/templates/index-topnav.html index 3b22b02b8..ad433a8e1 100644 --- a/ruoyi-admin/src/main/resources/templates/index-topnav.html +++ b/ruoyi-admin/src/main/resources/templates/index-topnav.html @@ -4,7 +4,7 @@ - 若依系统首页 + BPS管理系统首页 diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index 4f41c96f0..629c56af7 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -4,7 +4,7 @@ - 若依系统首页 + BPS管理系统首页 @@ -26,7 +26,7 @@