From ddd4b3763cfd034040ea4b867863850e091c46aa Mon Sep 17 00:00:00 2001 From: xiezhijun <15270898033@163.com> Date: Mon, 24 May 2021 16:41:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E7=B2=89=E8=AE=B0=E5=BD=95=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E9=87=87=E8=B4=AD=E8=AE=A1=E5=88=92SQL?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E5=90=8E=E7=BB=AD=E5=BB=BA=E7=AB=8B?= =?UTF-8?q?=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom/SysImportFanRecordController.java | 22 ++++++ .../service/impl/SysRecipesServiceImpl.java | 5 +- .../mapper/custom/SysLiveSchedulMapper.xml | 23 +++--- .../mapper/custom/SysRecipesMapper.xml | 10 ++- stdiet-ui/src/api/custom/importFanRecord.js | 19 ++++- .../views/custom/importFanRecord/index.vue | 75 +++++++++++++++++-- .../src/views/custom/liveSchedul/index.vue | 10 +-- 7 files changed, 137 insertions(+), 27 deletions(-) diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysImportFanRecordController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysImportFanRecordController.java index e85a65438..eacf08a14 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysImportFanRecordController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysImportFanRecordController.java @@ -162,4 +162,26 @@ public class SysImportFanRecordController extends BaseController result.put("fanNumList", fanNumList); return AjaxResult.success(result); } + + /** + * 删除导粉记录中对应微信记录 + */ + @PreAuthorize("@ss.hasPermi('custom:importFanRecord:remove')") + @Log(title = "删除导粉记录中对应微信记录", businessType = BusinessType.DELETE) + @GetMapping("/removeFanWxAccount/{ids}") + public AjaxResult removeFanWxAccount(@PathVariable Long[] ids) + { + return toAjax(sysImportFanWxAccountService.deleteSysImportFanWxAccountByIds(ids)); + } + + /** + * 删除导粉记录中对应微信记录 + */ + @PreAuthorize("@ss.hasPermi('custom:importFanRecord:edit')") + @GetMapping("/saveWxAccountFanNum") + public AjaxResult saveWxAccountFanNum(SysImportFanWxAccount sysImportFanWxAccount) + { + return toAjax(sysImportFanWxAccountService.updateSysImportFanWxAccount(sysImportFanWxAccount)); + } + } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java index e11568e7a..021166223 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesServiceImpl.java @@ -64,7 +64,10 @@ public class SysRecipesServiceImpl implements ISysRecipesService { @Override public List selectSysRecipesByRecipesId(Long id) { - return sysRecipesMapper.selectSysRecipesByRecipesId(id); + long t = System.currentTimeMillis(); + List list = sysRecipesMapper.selectSysRecipesByRecipesId(id); + System.out.println(System.currentTimeMillis() - t); + return list; } @Override diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysLiveSchedulMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysLiveSchedulMapper.xml index e7b0e32ef..2b309d9cd 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysLiveSchedulMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysLiveSchedulMapper.xml @@ -28,7 +28,7 @@ - + @@ -74,9 +74,9 @@ and slc.fan_channel = #{fanChannel} - + order by slc.live_schedul_date desc,slc.live_start_time desc ,slc.live_room asc @@ -162,14 +162,15 @@ - - + SELECT su.nick_name as saleName,w.wx_account as wxAccount, sum(wa.import_fan_num) as fanNum from sys_import_fan_record as fc + left join sys_import_fan_wx_account as wa on wa.import_fan_record_id = fc.id and wa.del_flag = 0 + left join sys_wx_sale_account as w on w.id = wa.import_wx_account_id and w.del_flag = 0 + left join sys_wx_distribution swd on swd.wechat_account = w.id and swd.del_flag = 0 + left join sys_user su on swd.user_id = su.user_id and su.del_flag = 0 + where fc.import_fan_live = #{id} and fc.del_flag = 0 + group by w.wx_account,su.nick_name diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesMapper.xml index ad69948f1..549ae9e2a 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesMapper.xml @@ -198,12 +198,16 @@