Skip to content

Commit

Permalink
Merge branch 'gitee-master' into github-master
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoNanSheng committed May 26, 2023
2 parents 4a944ae + ee070b9 commit 4cb085c
Show file tree
Hide file tree
Showing 207 changed files with 6,052 additions and 401 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[![star](https://gitee.com/LinkWeChat/link-wechat/badge/star.svg?theme=gvp)](https://gitee.com/LinkWeChat/link-wechat/stargazers)
[![fork](https://gitee.com/LinkWeChat/link-wechat/badge/fork.svg?theme=gvp)](https://gitee.com/LinkWeChat/link-wechat/members)
[![LinkWeChat](https://img.shields.io/badge/LinkWeChat-V4.1-brightgreen)](https://www.yuque.com/linkwechat/help/ci1n9p)
[![LinkWeChat](https://img.shields.io/badge/LinkWeChat-V4.6-brightgreen)](https://www.yuque.com/linkwechat/help/ci1n9p)
[![license](http://img.shields.io/badge/license-GPL%203.0-orange)](https://gitee.com/LinkWeChat/link-wechat/blob/master/LICENSE)
[![木兰社区](https://img.shields.io/badge/Mulan-incubating-blue)](https://portal.mulanos.cn//)

Expand Down
Binary file modified config/lw_nacos_config.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
* @author sxw
* @author danmo
* @description 拦截器配置
* @date 2022/4/9 22:58
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,8 @@ public AjaxResult revokeMsgInfo(@PathVariable("id") Long id) {
return AjaxResult.success();
}

public static void main(String[] args) {
System.out.println(SecurityUtils.encryptPassword("123456"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* 聊天工具 侧边栏 素材收藏
*
* @author sxw
* @author danmo
*/
@Api(tags = "素材收藏接口")
@RequestMapping(value = "/chat/collection")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ public class WeCorpAccountController extends BaseController {
@Autowired
private LinkWeChatConfig linkWeChatConfig;

@Autowired
private QwCorpClient qwCorpClient;

/**
* 获取当前租户信息
Expand All @@ -46,11 +44,9 @@ public AjaxResult<WeCorpAccount> findCurrentCorpAccount() {
public AjaxResult addOrUpdate(@RequestBody WeCorpAccount weCorpAccount) {
if(linkWeChatConfig.isDemoEnviron()){
return AjaxResult.error("当前为演示环境,无法修改配置");

}
if(iWeCorpAccountService.saveOrUpdate(weCorpAccount)){
qwCorpClient.removeAllWeAccessToken(weCorpAccount.getCorpId());
};

iWeCorpAccountService.addOrUpdate(weCorpAccount);
return AjaxResult.success();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ public TableDataInfo list(WeMoments weMoments) {
/**
* 获取朋友圈详情
*
* @param momentId
* @param id
* @return
*/
@GetMapping("/findMomentsDetail/{momentId}")
public AjaxResult findMomentsDetail(@PathVariable String momentId) {
return AjaxResult.success(iWeMomentsService.findMomentsDetail(momentId));
@GetMapping("/findMomentsDetail/{id}")
public AjaxResult findMomentsDetail(@PathVariable("id") Long id) {
return AjaxResult.success(iWeMomentsService.findMomentsDetail(id));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.List;

/**
* @author sxw
* @author danmo
* @description 欢迎语管理
* @date 2022/3/26 10:29
**/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
package com.linkwechat.controller;

import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.write.builder.ExcelWriterBuilder;
import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.Put;
import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.utils.ServletUtils;
import com.linkwechat.domain.kf.vo.WeKfQualityChatVo;
import com.linkwechat.domain.msgaudit.vo.WeChatContactMsgVo;
import com.linkwechat.domain.qirule.query.*;
import com.linkwechat.domain.qirule.vo.*;
import com.linkwechat.domain.qr.vo.WeLxQrCodeReceiveListVo;
import com.linkwechat.handler.WeQiRuleWeeklyUserDetailWriteHandler;
import com.linkwechat.handler.WeQualityWriteHandler;
import com.linkwechat.service.IWeQiRuleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.List;

/**
* 会话质检管理
*
* @author danmo
* @date 2023/05/05 18:22
**/
@Slf4j
@RestController
@RequestMapping(value = "qi")
@Api(tags = "会话质检管理")
public class WeQiRuleController extends BaseController {

@Autowired
private IWeQiRuleService weQiRuleService;

@ApiOperation(value = "新增质检规则", httpMethod = "POST")
@PostMapping("/add")
public AjaxResult addQiRule(@RequestBody @Validated WeQiRuleAddQuery query) {
weQiRuleService.addQiRule(query);
return AjaxResult.success();
}

@ApiOperation(value = "修改质检规则", httpMethod = "PUT")
@PutMapping("/update/{id}")
public AjaxResult updateQiRule(@PathVariable("id") Long id, @RequestBody @Validated WeQiRuleAddQuery query) {
query.setQiId(id);
weQiRuleService.updateQiRule(query);
return AjaxResult.success();
}


@ApiOperation(value = "获取质检规则详情", httpMethod = "GET")
@GetMapping("/get/{id}")
public AjaxResult<WeQiRuleDetailVo> getQiRuleDetail(@PathVariable("id") Long id) {
WeQiRuleDetailVo detail = weQiRuleService.getQiRuleDetail(id);
return AjaxResult.success(detail);
}

@ApiOperation(value = "获取质检规则列表", httpMethod = "GET")
@GetMapping("/list")
public TableDataInfo<WeQiRuleListVo> getQiRuleList(WeQiRuleListQuery query) {
startPage();
List<WeQiRuleListVo> qrCodeList = weQiRuleService.getQiRuleList(query);
return getDataTable(qrCodeList);
}

@ApiOperation(value = "删除质检规则", httpMethod = "DELETE")
@DeleteMapping("/del/{ids}")
public AjaxResult delQiRule(@PathVariable("ids") List<Long> ids) {
weQiRuleService.delQiRule(ids);
return AjaxResult.success();
}

@ApiOperation(value = "质检数据看板统计", httpMethod = "GET")
@GetMapping("/statistics/view/{id}")
public AjaxResult<WeQiRuleStatisticsViewVo> qiRuleViewStatistics(@PathVariable("id") Long id) {
WeQiRuleStatisticsViewVo viewVo = weQiRuleService.qiRuleViewStatistics(id);
return AjaxResult.success(viewVo);
}

@ApiOperation(value = "质检数据列表统计", httpMethod = "GET")
@GetMapping("/statistics/table/{id}")
public TableDataInfo<List<WeQiRuleStatisticsTableVo>> qiRuleTableStatistics(@PathVariable("id") Long id, WeQiRuleStatisticsTableListQuery query) {
startPage();
query.setRuleId(id);
List<WeQiRuleStatisticsTableVo> list = weQiRuleService.qiRuleTableStatistics(query);
return getDataTable(list);
}

@ApiOperation(value = "质检数据统计聊天记录", httpMethod = "POST")
@PostMapping("/statistics/table/msg")
public AjaxResult<List<WeChatContactMsgVo>> getQiRuleTableStatisticsMsg(@RequestBody WeQiRuleStatisticsTableMsgQuery query) {
List<WeChatContactMsgVo> list = weQiRuleService.getQiRuleTableStatisticsMsg(query);
return AjaxResult.success(list);
}

@ApiOperation(value = "质检通知列表",httpMethod = "GET")
@GetMapping("/notice/list")
public TableDataInfo<List<WeQiRuleNoticeListVo>> getNoticeList(WeQiRuleNoticeListQuery query){
startPage();
List<WeQiRuleNoticeListVo> list = weQiRuleService.getNoticeList(query);
return getDataTable(list);
}


@ApiOperation(value = "质检通知设置回复状态", httpMethod = "PUT")
@PutMapping("/notice/update/replyStatus/{qiRuleMsgId}")
public AjaxResult updateReplyStatus(@PathVariable("qiRuleMsgId") Long qiRuleMsgId){
weQiRuleService.updateReplyStatus(qiRuleMsgId);
return AjaxResult.success();
}

@ApiOperation(value = "质检周报列表",httpMethod = "GET")
@GetMapping("/weekly/list")
public TableDataInfo<List<WeQiRuleWeeklyListVo>> getWeeklyList(WeQiRuleWeeklyListQuery query){
super.startPage();
List<WeQiRuleWeeklyListVo> list = weQiRuleService.getWeeklyList(query);
return getDataTable(list);
}

@ApiOperation(value = "质检周报详情",httpMethod = "GET")
@GetMapping("/weekly/getDetail/{id}")
public AjaxResult<WeQiRuleWeeklyDetailVo> getWeeklyDetail(@PathVariable("id") Long id){
WeQiRuleWeeklyDetailVo detail = weQiRuleService.getWeeklyDetail(id);
return AjaxResult.success(detail);
}

@ApiOperation(value = "质检周报明细列表",httpMethod = "GET")
@GetMapping("/weekly/detail/list/{id}")
public TableDataInfo<List<WeQiRuleWeeklyDetailListVo>> getWeeklyDetailList(@PathVariable("id") Long id, WeQiRuleWeeklyDetailListQuery query){
query.setWeeklyId(id);
super.startPage();
List<WeQiRuleWeeklyDetailListVo> list = weQiRuleService.getWeeklyDetailList(query);
return getDataTable(list);
}

@ApiOperation(value = "质检周报明细列表导出",httpMethod = "GET")
@GetMapping("/weekly/detail/list/export/{id}")
public void weeklyDetailListExport(@PathVariable("id") Long id, WeQiRuleWeeklyDetailListQuery query){
query.setWeeklyId(id);
List<WeQiRuleWeeklyDetailListVo> list = weQiRuleService.getWeeklyDetailList(query);
try {
HttpServletResponse response = ServletUtils.getResponse();
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode("质检周报明细", "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
ExcelWriterBuilder write = EasyExcel.write(response.getOutputStream(), WeQiRuleWeeklyDetailListVo.class);
write.relativeHeadRowIndex(1);
write.registerWriteHandler(new WeQiRuleWeeklyUserDetailWriteHandler(query));
write.sheet("质检周报明细").doWrite(list);
} catch (IOException e) {
log.error("质检周报明细列表导出异常:query:{}", JSONObject.toJSONString(query),e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.enums.RedEnvelopesType;
import com.linkwechat.common.utils.ServletUtils;
import com.linkwechat.common.utils.StringUtils;
import com.linkwechat.common.utils.poi.ExcelUtil;
import com.linkwechat.common.utils.poi.LwExcelUtil;
import com.linkwechat.domain.WeCorpAccount;
import com.linkwechat.domain.envelopes.WeRedEnvelopes;
import com.linkwechat.domain.envelopes.WeRedEnvelopesLimit;
Expand Down Expand Up @@ -264,10 +266,11 @@ public TableDataInfo findRedEnveForUser(WeRedEnvelopesRecord redEnvelopesRecord)
* @return
*/
@GetMapping("/exportRedEnveForUser")
public AjaxResult exportRedEnveForUser(WeRedEnvelopesRecord redEnvelopesRecord){
public void exportRedEnveForUser(WeRedEnvelopesRecord redEnvelopesRecord){
List<WeCutomerRedEnvelopesVo> redEnvelopesVos=iWeRedEnvelopesService.findRedEnveForUser(redEnvelopesRecord);
ExcelUtil<WeCutomerRedEnvelopesVo> util = new ExcelUtil<>(WeCutomerRedEnvelopesVo.class);
return util.exportExcel(redEnvelopesVos, UUID.randomUUID().toString());
LwExcelUtil.exprotForWeb(
ServletUtils.getResponse(), WeCutomerRedEnvelopesVo.class,redEnvelopesVos,"客户红包发放记录"
);
}


Expand All @@ -291,10 +294,12 @@ public TableDataInfo findRedEnveForGroup(WeRedEnvelopesRecord redEnvelopesRecord
* @return
*/
@GetMapping("/exportRedEnveForGroup")
public AjaxResult exportRedEnveForGroup(WeRedEnvelopesRecord redEnvelopesRecord){
public void exportRedEnveForGroup(WeRedEnvelopesRecord redEnvelopesRecord){
List<WeGroupRedEnvelopesVo> redEnvelopesVos=iWeRedEnvelopesService.findRedEnveForGroup(redEnvelopesRecord);
ExcelUtil<WeGroupRedEnvelopesVo> util = new ExcelUtil<WeGroupRedEnvelopesVo>(WeGroupRedEnvelopesVo.class);
return util.exportExcel(redEnvelopesVos, "红包发放客户群");

LwExcelUtil.exprotForWeb(
ServletUtils.getResponse(), WeGroupRedEnvelopesVo.class,redEnvelopesVos,"红包发放客户群"
);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,11 @@ public TableDataInfo<WeStoreShopGuideReportVo> countShopGuideReport(WeStoreCode
* @return
*/
@GetMapping("/exportCountShopGuideReport")
public AjaxResult exportCountShopGuideReport(WeStoreCode weStoreCode){
List<WeStoreShopGuideReportVo> weStoreShopGuideReportVos
= iWeStoreCodeService.countShopGuideReport(weStoreCode);
ExcelUtil<WeStoreShopGuideReportVo> util = new ExcelUtil<WeStoreShopGuideReportVo>(WeStoreShopGuideReportVo.class);
return util.exportExcel(weStoreShopGuideReportVos, DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD)+"_门店导购统计");
public void exportCountShopGuideReport(WeStoreCode weStoreCode){

LwExcelUtil.exprotForWeb(
ServletUtils.getResponse(), WeStoreShopGuideReportVo.class, iWeStoreCodeService.countShopGuideReport(weStoreCode),DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD) + "_门店导购统计"
);
}


Expand All @@ -386,11 +385,10 @@ public TableDataInfo<WeStoreGroupReportVo> countStoreGroupReport(WeStoreCode weS
* @return
*/
@GetMapping("/exportCountStoreGroupReport")
public AjaxResult exportCountStoreGroupReport(WeStoreCode weStoreCode){
List<WeStoreGroupReportVo> weStoreGroupReportVos
= iWeStoreCodeService.countStoreGroupReport(weStoreCode);
ExcelUtil<WeStoreGroupReportVo> util = new ExcelUtil<WeStoreGroupReportVo>(WeStoreGroupReportVo.class);
return util.exportExcel(weStoreGroupReportVos, DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD)+"_门店群码统计");
public void exportCountStoreGroupReport(WeStoreCode weStoreCode){
LwExcelUtil.exprotForWeb(
ServletUtils.getResponse(), WeStoreGroupReportVo.class, iWeStoreCodeService.countStoreGroupReport(weStoreCode),DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD) + "_门店群码统计"
);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
* @author sxw
* @author danmo
* @description 拦截器配置
* @date 2022/4/9 22:58
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,17 @@ public AjaxResult updateUserKfStatus(@RequestBody SysUser sysUser) {
return AjaxResult.success();
}

/**
* 更新员工开启会话存档状态
* @param query
* @return
*/
@PutMapping("/update/chat/status")
public AjaxResult updateUserChatStatus(@RequestBody SysUserQuery query){
userService.updateUserChatStatus(query);
return AjaxResult.success();
}

/**
* 通过企微员工ID获取员工信息
* @param query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
//import com.linkwechat.common.annotation.PhoneEncryptMethod;
import com.linkwechat.common.core.domain.entity.SysUser;
import com.linkwechat.common.core.page.PageDomain;
import com.linkwechat.domain.system.user.query.SysUserQuery;
import com.linkwechat.domain.system.user.vo.SysUserVo;
import com.linkwechat.web.domain.vo.UserRoleVo;
import com.linkwechat.web.domain.vo.UserVo;
import org.apache.ibatis.annotations.Param;
Expand Down Expand Up @@ -154,4 +156,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
* @return
*/
List<SysUser> findAllSysUser(@Param("weUserIds") String weUserIds,@Param("positions") String positions,@Param("deptIds") String deptIds);


List<SysUserVo> getUserListByQuery(SysUserQuery query);
}
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ public interface ISysUserService extends IService<SysUser> {
*/
void builderLeaveSysUser(List<SysUser> sysUsers);






/**
* 更新员工开启会话存档状态
* @param query
*/
void updateUserChatStatus(SysUserQuery query);
}
Loading

0 comments on commit 4cb085c

Please sign in to comment.