mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-07 23:57:20 +08:00
优化调整代码规范
This commit is contained in:
@@ -2,11 +2,13 @@ package com.mdd.admin.controller.channel;
|
||||
|
||||
import com.mdd.admin.config.aop.Log;
|
||||
import com.mdd.admin.service.channel.IChannelH5Service;
|
||||
import com.mdd.admin.validate.channel.ChannelH5Param;
|
||||
import com.mdd.admin.vo.channel.ChannelH5Vo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* H5渠道设置
|
||||
@@ -22,25 +24,25 @@ public class H5Controller {
|
||||
* H5渠道设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
Map<String, Object> map = iChannelH5Service.detail();
|
||||
return AjaxResult.success(map);
|
||||
public AjaxResult detail() {
|
||||
ChannelH5Vo vo = iChannelH5Service.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* H5渠道设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param param 参数
|
||||
* @return Object
|
||||
* @param channelH5Param 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "H5渠道设置保存")
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, String> param) {
|
||||
iChannelH5Service.save(param);
|
||||
public AjaxResult save(@Validated @RequestBody ChannelH5Param channelH5Param) {
|
||||
iChannelH5Service.save(channelH5Param);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ package com.mdd.admin.controller.channel;
|
||||
|
||||
import com.mdd.admin.config.aop.Log;
|
||||
import com.mdd.admin.service.channel.IChannelMpService;
|
||||
import com.mdd.admin.validate.channel.ChannelMpParam;
|
||||
import com.mdd.admin.vo.channel.ChannelMpVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 微信小程序渠道设置
|
||||
@@ -22,25 +24,25 @@ public class MpController {
|
||||
* 微信小程序渠道设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
Map<String, Object> map = iChannelMpService.detail();
|
||||
return AjaxResult.success(map);
|
||||
public AjaxResult detail() {
|
||||
ChannelMpVo vo = iChannelMpService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信小程序渠道设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param param 参数
|
||||
* @return Object
|
||||
* @param channelMpParam 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "微信小程序渠道设置保存")
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, String> param) {
|
||||
iChannelMpService.save(param);
|
||||
public AjaxResult save(@Validated @RequestBody ChannelMpParam channelMpParam) {
|
||||
iChannelMpService.save(channelMpParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ package com.mdd.admin.controller.channel;
|
||||
|
||||
import com.mdd.admin.config.aop.Log;
|
||||
import com.mdd.admin.service.channel.IChannelOaService;
|
||||
import com.mdd.admin.validate.channel.ChannelOaParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 微信公众号渠道设置
|
||||
@@ -22,25 +24,25 @@ public class OaController {
|
||||
* 公众号渠道设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
Map<String, Object> map = iChannelOaService.detail();
|
||||
return AjaxResult.success(map);
|
||||
public AjaxResult detail() {
|
||||
ChannelOaVo vo = iChannelOaService.detail();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公众号渠道设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param param 参数
|
||||
* @return Object
|
||||
* @param channelOaParam 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Log(title = "公众号渠道设置保存")
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, String> param) {
|
||||
iChannelOaService.save(param);
|
||||
public AjaxResult save(@Validated @RequestBody ChannelOaParam channelOaParam) {
|
||||
iChannelOaService.save(channelOaParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ public class OaMenuController {
|
||||
* 菜单详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail() {
|
||||
public AjaxResult detail() {
|
||||
JSONArray detail = iChannelOaMenuService.detail();
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
@@ -35,10 +35,10 @@ public class OaMenuController {
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody List<Object> params) {
|
||||
public AjaxResult save(@RequestBody List<Object> params) {
|
||||
iChannelOaMenuService.save(params, false);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@@ -48,10 +48,10 @@ public class OaMenuController {
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/publish")
|
||||
public Object publish(@RequestBody List<Object> params) {
|
||||
public AjaxResult publish(@RequestBody List<Object> params) {
|
||||
iChannelOaMenuService.save(params, true);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
package com.mdd.admin.controller.channel;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.mdd.admin.service.channel.IChannelOaReplyService;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 公众号回复管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaReply")
|
||||
public class OaReplyController {
|
||||
|
||||
@Resource
|
||||
IChannelOaReplyService iChannelOaReplyService;
|
||||
|
||||
/**
|
||||
* 回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Object list(@Validated PageParam pageParam,
|
||||
@RequestParam Map<String, String> params) {
|
||||
List<Map<String, Object>> list = iChannelOaReplyService.list(pageParam, params);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
Map<String, Object> map = iChannelOaReplyService.detail(id);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return Object
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public Object add(@RequestBody Map<String, String> params) {
|
||||
iChannelOaReplyService.add(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public Object edit(@RequestBody Map<String, String> params) {
|
||||
iChannelOaReplyService.edit(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public Object del(@RequestBody Map<String, String> params) {
|
||||
Assert.notNull(params.get("id"), "id参数缺失");
|
||||
iChannelOaReplyService.del(Integer.parseInt(params.get("id")));
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @return Object
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
public Object status(@RequestBody Map<String, String> params) {
|
||||
Assert.notNull(params.get("id"), "id参数缺失");
|
||||
iChannelOaReplyService.status(Integer.parseInt(params.get("id")));
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.mdd.admin.controller.channel;
|
||||
|
||||
import com.mdd.admin.service.channel.IChannelOaReplyDefaultService;
|
||||
import com.mdd.admin.validate.channel.ChannelOaReplyParam;
|
||||
import com.mdd.admin.validate.common.IDParam;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaReplyVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 公众号默认回复管理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaReplyDefault")
|
||||
public class OaReplyDefaultController {
|
||||
|
||||
@Resource
|
||||
IChannelOaReplyDefaultService iChannelOaReplyDefaultService;
|
||||
|
||||
/**
|
||||
* 默认回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(@Validated PageParam pageParam) {
|
||||
PageResult<ChannelOaReplyVo> list = iChannelOaReplyDefaultService.list(pageParam);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ChannelOaReplyVo vo = iChannelOaReplyDefaultService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@Validated(value = ChannelOaReplyParam.defaults.class) @RequestBody ChannelOaReplyParam channelOaReplyParam) {
|
||||
iChannelOaReplyDefaultService.add(channelOaReplyParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@Validated(value = ChannelOaReplyParam.defaults.class) @RequestBody ChannelOaReplyParam channelOaReplyParam) {
|
||||
iChannelOaReplyDefaultService.edit(channelOaReplyParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public AjaxResult del(@Validated @RequestBody IDParam idParam) {
|
||||
iChannelOaReplyDefaultService.del(idParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
public AjaxResult status(@Validated @RequestBody IDParam idParam) {
|
||||
iChannelOaReplyDefaultService.status(idParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.mdd.admin.controller.channel;
|
||||
|
||||
import com.mdd.admin.service.channel.IChannelOaReplyFollowService;
|
||||
import com.mdd.admin.validate.channel.ChannelOaReplyParam;
|
||||
import com.mdd.admin.validate.common.IDParam;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaReplyVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaReplyFollow")
|
||||
public class OaReplyFollowController {
|
||||
|
||||
@Resource
|
||||
IChannelOaReplyFollowService iChannelOaReplyFollowService;
|
||||
|
||||
/**
|
||||
* 关注回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(@Validated PageParam pageParam) {
|
||||
PageResult<ChannelOaReplyVo> list = iChannelOaReplyFollowService.list(pageParam);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ChannelOaReplyVo vo = iChannelOaReplyFollowService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@Validated(value = ChannelOaReplyParam.follow.class) @RequestBody ChannelOaReplyParam channelOaReplyParam) {
|
||||
iChannelOaReplyFollowService.add(channelOaReplyParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@Validated(value = ChannelOaReplyParam.follow.class) @RequestBody ChannelOaReplyParam channelOaReplyParam) {
|
||||
iChannelOaReplyFollowService.edit(channelOaReplyParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public AjaxResult del(@Validated @RequestBody IDParam idParam) {
|
||||
iChannelOaReplyFollowService.del(idParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
public AjaxResult status(@Validated @RequestBody IDParam idParam) {
|
||||
iChannelOaReplyFollowService.status(idParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.mdd.admin.controller.channel;
|
||||
|
||||
import com.mdd.admin.service.channel.IChannelOaReplyKeywordService;
|
||||
import com.mdd.admin.validate.channel.ChannelOaReplyParam;
|
||||
import com.mdd.admin.validate.common.IDParam;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaReplyVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/channel/oaReplyKeyword")
|
||||
public class OaReplyKeywordController {
|
||||
|
||||
@Resource
|
||||
IChannelOaReplyKeywordService iChannelOaReplyKeywordService;
|
||||
|
||||
/**
|
||||
* 关键词回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(@Validated PageParam pageParam) {
|
||||
PageResult<ChannelOaReplyVo> list = iChannelOaReplyKeywordService.list(pageParam);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public AjaxResult detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
ChannelOaReplyVo vo = iChannelOaReplyKeywordService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@Validated(value = ChannelOaReplyParam.keywords.class) @RequestBody ChannelOaReplyParam channelOaReplyParam) {
|
||||
iChannelOaReplyKeywordService.add(channelOaReplyParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@Validated(value = ChannelOaReplyParam.keywords.class) @RequestBody ChannelOaReplyParam channelOaReplyParam) {
|
||||
iChannelOaReplyKeywordService.edit(channelOaReplyParam);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public AjaxResult del(@Validated @RequestBody IDParam idParam) {
|
||||
iChannelOaReplyKeywordService.del(idParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@PostMapping("/status")
|
||||
public AjaxResult status(@Validated @RequestBody IDParam idParam) {
|
||||
iChannelOaReplyKeywordService.status(idParam.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.mdd.admin.service.channel;
|
||||
|
||||
import com.mdd.admin.validate.channel.ChannelH5Param;
|
||||
import com.mdd.admin.vo.channel.ChannelH5Vo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -11,15 +14,16 @@ public interface IChannelH5Service {
|
||||
* H5设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Map<String, String>
|
||||
* @return ChannelH5Vo
|
||||
*/
|
||||
Map<String, Object> detail();
|
||||
ChannelH5Vo detail();
|
||||
|
||||
/**
|
||||
* H5设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelH5Param 参数
|
||||
*/
|
||||
void save(Map<String, String> param);
|
||||
void save(ChannelH5Param channelH5Param);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.mdd.admin.service.channel;
|
||||
|
||||
import com.mdd.admin.validate.channel.ChannelMpParam;
|
||||
import com.mdd.admin.vo.channel.ChannelMpVo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -11,15 +14,16 @@ public interface IChannelMpService {
|
||||
* 微信小程序设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Map<String, String>
|
||||
* @return ChannelMpVo
|
||||
*/
|
||||
Map<String, Object> detail();
|
||||
ChannelMpVo detail();
|
||||
|
||||
/**
|
||||
* 微信小程序设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelMpParam
|
||||
*/
|
||||
void save(Map<String, String> param);
|
||||
void save(ChannelMpParam channelMpParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.mdd.admin.service.channel;
|
||||
|
||||
import com.mdd.admin.validate.channel.ChannelOaReplyParam;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaReplyVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公众号默认回复服务接口类
|
||||
*/
|
||||
public interface IChannelOaReplyDefaultService {
|
||||
|
||||
/**
|
||||
* 默认回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @return PageResult<ChannelOaReplyVo>
|
||||
*/
|
||||
PageResult<ChannelOaReplyVo> list(PageParam pageParam);
|
||||
|
||||
/**
|
||||
* 默认回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return ChannelOaReplyDefaultVo
|
||||
*/
|
||||
ChannelOaReplyVo detail(Integer id);
|
||||
|
||||
/**
|
||||
* 默认回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
void add(ChannelOaReplyParam channelOaReplyParam);
|
||||
|
||||
/**
|
||||
* 默认回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
void edit(ChannelOaReplyParam channelOaReplyParam);
|
||||
|
||||
/**
|
||||
* 默认回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
void del(Integer id);
|
||||
|
||||
/**
|
||||
* 默认回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
void status(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.mdd.admin.service.channel;
|
||||
|
||||
import com.mdd.admin.validate.channel.ChannelOaReplyParam;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaReplyVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公众号关注回复服务接口类
|
||||
*/
|
||||
public interface IChannelOaReplyFollowService {
|
||||
|
||||
/**
|
||||
* 关注回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @return PageResult<ChannelOaReplyVo>
|
||||
*/
|
||||
PageResult<ChannelOaReplyVo> list(PageParam pageParam);
|
||||
|
||||
/**
|
||||
* 关注回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return ChannelOaReplyFollowVo
|
||||
*/
|
||||
ChannelOaReplyVo detail(Integer id);
|
||||
|
||||
/**
|
||||
* 关注回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
void add(ChannelOaReplyParam channelOaReplyParam);
|
||||
|
||||
/**
|
||||
* 关注回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
void edit(ChannelOaReplyParam channelOaReplyParam);
|
||||
|
||||
/**
|
||||
* 关注回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
void del(Integer id);
|
||||
|
||||
/**
|
||||
* 关注回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
void status(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mdd.admin.service.channel;
|
||||
|
||||
import com.mdd.admin.validate.channel.ChannelOaReplyParam;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaReplyVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公众号关键词回复服务接口类
|
||||
*/
|
||||
public interface IChannelOaReplyKeywordService {
|
||||
|
||||
/**
|
||||
* 关键词回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @return PageResult<ChannelOaReplyVo>
|
||||
*/
|
||||
PageResult<ChannelOaReplyVo> list(PageParam pageParam);
|
||||
|
||||
/**
|
||||
* 关键词回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
ChannelOaReplyVo detail(Integer id);
|
||||
|
||||
|
||||
/**
|
||||
* 关键词回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
void add(ChannelOaReplyParam channelOaReplyParam);
|
||||
|
||||
/**
|
||||
* 关键词回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
void edit(ChannelOaReplyParam channelOaReplyParam);
|
||||
|
||||
/**
|
||||
* 关键词回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
void del(Integer id);
|
||||
|
||||
/**
|
||||
* 关键词回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
void status(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
package com.mdd.admin.service.channel;
|
||||
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 公众号回复服务接口类
|
||||
*/
|
||||
public interface IChannelOaReplyService {
|
||||
|
||||
/**
|
||||
* 回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @param params 参数
|
||||
* @return List<Map<String, Object>>
|
||||
*/
|
||||
List<Map<String, Object>> list(PageParam pageParam, Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> detail(Integer id);
|
||||
|
||||
/**
|
||||
* 回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
*/
|
||||
void add(Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
*/
|
||||
void edit(Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
void del(Integer id);
|
||||
|
||||
/**
|
||||
* 回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
void status(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.service.channel;
|
||||
|
||||
import java.util.Map;
|
||||
import com.mdd.admin.validate.channel.ChannelOaParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaVo;
|
||||
|
||||
|
||||
/**
|
||||
* 公众号渠道设置服务接口类
|
||||
@@ -11,15 +13,16 @@ public interface IChannelOaService {
|
||||
* 公众号设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Map<String, String>
|
||||
* @return ChannelOaVo
|
||||
*/
|
||||
Map<String, Object> detail();
|
||||
ChannelOaVo detail();
|
||||
|
||||
/**
|
||||
* 公众号设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaParam 参数
|
||||
*/
|
||||
void save(Map<String, String> param);
|
||||
void save(ChannelOaParam channelOaParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.service.channel.impl;
|
||||
|
||||
import com.mdd.admin.service.channel.IChannelH5Service;
|
||||
import com.mdd.admin.validate.channel.ChannelH5Param;
|
||||
import com.mdd.admin.vo.channel.ChannelH5Vo;
|
||||
import com.mdd.common.utils.ConfigUtil;
|
||||
import com.mdd.common.utils.RequestUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -18,30 +20,29 @@ public class ChannelH5ServiceImpl implements IChannelH5Service {
|
||||
* H5渠道配置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Map<String, Object>
|
||||
* @return ChannelH5Vo
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> detail() {
|
||||
public ChannelH5Vo detail() {
|
||||
Map<String, String> config = ConfigUtil.get("h5_channel");
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("status", Integer.parseInt(config.getOrDefault("status", "0")));
|
||||
map.put("close", Integer.parseInt(config.getOrDefault("close", "0")));
|
||||
map.put("url", config.getOrDefault("url", ""));
|
||||
map.put("accessLink", RequestUtil.domain());
|
||||
return map;
|
||||
ChannelH5Vo vo = new ChannelH5Vo();
|
||||
vo.setStatus(Integer.parseInt(config.getOrDefault("status", "0")));
|
||||
vo.setClose(Integer.parseInt(config.getOrDefault("close", "0")));
|
||||
vo.setUrl(config.getOrDefault("url", ""));
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* H5渠道配置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param param 参数
|
||||
* @param channelH5Param 参数
|
||||
*/
|
||||
@Override
|
||||
public void save(Map<String, String> param) {
|
||||
ConfigUtil.set("h5_channel", "status", param.getOrDefault("status", "0"));
|
||||
ConfigUtil.set("h5_channel", "close", param.getOrDefault("close", "0"));
|
||||
ConfigUtil.set("h5_channel", "url", param.getOrDefault("url", "0"));
|
||||
public void save(ChannelH5Param channelH5Param) {
|
||||
ConfigUtil.set("h5_channel", "status", String.valueOf(channelH5Param.getStatus()));
|
||||
ConfigUtil.set("h5_channel", "close", String.valueOf(channelH5Param.getClose()));
|
||||
ConfigUtil.set("h5_channel", "url", channelH5Param.getUrl());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mdd.admin.service.channel.impl;
|
||||
|
||||
import com.mdd.admin.service.channel.IChannelMpService;
|
||||
import com.mdd.admin.validate.channel.ChannelMpParam;
|
||||
import com.mdd.admin.vo.channel.ChannelMpVo;
|
||||
import com.mdd.common.utils.ConfigUtil;
|
||||
import com.mdd.common.utils.RequestUtil;
|
||||
import com.mdd.common.utils.UrlUtil;
|
||||
@@ -19,43 +21,45 @@ public class ChannelMpServiceImpl implements IChannelMpService {
|
||||
* 微信小程序渠道详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Map<String, Object>
|
||||
* @return ChannelMpVo
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> detail() {
|
||||
public ChannelMpVo detail() {
|
||||
Map<String, String> config = ConfigUtil.get("mp_channel");
|
||||
System.out.println(config);
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("name", config.getOrDefault("name", ""));
|
||||
map.put("primaryId", config.getOrDefault("primaryId", ""));
|
||||
map.put("appId", config.getOrDefault("appId", ""));
|
||||
map.put("appSecret", config.getOrDefault("appSecret", ""));
|
||||
map.put("qrCode", UrlUtil.toAbsoluteUrl(config.getOrDefault("qrCode", "")));
|
||||
|
||||
ChannelMpVo vo = new ChannelMpVo();
|
||||
vo.setName(config.getOrDefault("name", ""));
|
||||
vo.setPrimaryId(config.getOrDefault("primaryId", ""));
|
||||
vo.setAppId(config.getOrDefault("appId", ""));
|
||||
vo.setAppSecret(config.getOrDefault("appSecret", ""));
|
||||
vo.setQrCode(UrlUtil.toAbsoluteUrl(config.getOrDefault("qrCode", "")));
|
||||
|
||||
|
||||
String domain = RequestUtil.domain();
|
||||
map.put("requestDomain", domain);
|
||||
map.put("socketDomain", domain);
|
||||
map.put("uploadFileDomain", domain);
|
||||
map.put("downloadFileDomain", domain);
|
||||
map.put("udpDomain", domain);
|
||||
map.put("tcpDomain", domain);
|
||||
map.put("businessDomain", domain);
|
||||
return map;
|
||||
vo.setRequestDomain(domain);
|
||||
vo.setSocketDomain(domain);
|
||||
vo.setUploadFileDomain(domain);
|
||||
vo.setDownloadFileDomain(domain);
|
||||
vo.setUdpDomain(domain);
|
||||
vo.setTcpDomain(domain);
|
||||
vo.setBusinessDomain(domain);
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信小程序渠道保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param param 参数
|
||||
* @param channelMpParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void save(Map<String, String> param) {
|
||||
ConfigUtil.set("mp_channel", "name", param.getOrDefault("name", ""));
|
||||
ConfigUtil.set("mp_channel", "primaryId", param.getOrDefault("primaryId", ""));
|
||||
ConfigUtil.set("mp_channel", "appId", param.getOrDefault("appId", ""));
|
||||
ConfigUtil.set("mp_channel", "appSecret", param.getOrDefault("appSecret", ""));
|
||||
ConfigUtil.set("mp_channel", "qrCode", UrlUtil.toRelativeUrl(param.getOrDefault("qrCode", "")));
|
||||
public void save(ChannelMpParam channelMpParam) {
|
||||
ConfigUtil.set("mp_channel", "name", channelMpParam.getName());
|
||||
ConfigUtil.set("mp_channel", "primaryId", channelMpParam.getPrimaryId());
|
||||
ConfigUtil.set("mp_channel", "appId", channelMpParam.getAppId());
|
||||
ConfigUtil.set("mp_channel", "appSecret", channelMpParam.getAppSecret());
|
||||
ConfigUtil.set("mp_channel", "qrCode", UrlUtil.toRelativeUrl(channelMpParam.getQrCode()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
package com.mdd.admin.service.channel.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mdd.admin.service.channel.IChannelOaReplyDefaultService;
|
||||
import com.mdd.admin.validate.channel.ChannelOaReplyParam;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaReplyVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.entity.OfficialReply;
|
||||
import com.mdd.common.mapper.OfficialReplyMapper;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 公众号默认回复服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ChannelOaReplyDefaultServiceImpl implements IChannelOaReplyDefaultService {
|
||||
|
||||
@Resource
|
||||
OfficialReplyMapper officialReplyMapper;
|
||||
|
||||
/**
|
||||
* 默认回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @return PageResult<ChannelOaReplyVo
|
||||
*/
|
||||
@Override
|
||||
public PageResult<ChannelOaReplyVo> list(PageParam pageParam) {
|
||||
Integer pageNo = pageParam.getPageNo();
|
||||
Integer pageSize = pageParam.getPageSize();
|
||||
|
||||
QueryWrapper<OfficialReply> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("reply_type", 3)
|
||||
.eq("is_delete", 0)
|
||||
.orderByDesc(Arrays.asList("sort", "id"));
|
||||
|
||||
IPage<OfficialReply> iPage = officialReplyMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
List<ChannelOaReplyVo> list = new LinkedList<>();
|
||||
for (OfficialReply officialReply : iPage.getRecords()) {
|
||||
ChannelOaReplyVo vo = new ChannelOaReplyVo();
|
||||
BeanUtils.copyProperties(officialReply, vo);
|
||||
list.add(vo);
|
||||
}
|
||||
|
||||
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return ChannelOaReplyDefaultVo
|
||||
*/
|
||||
@Override
|
||||
public ChannelOaReplyVo detail(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "默认数据不存在!");
|
||||
|
||||
ChannelOaReplyVo vo = new ChannelOaReplyVo();
|
||||
BeanUtils.copyProperties(officialReply, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复新
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void add(ChannelOaReplyParam channelOaReplyParam) {
|
||||
if (channelOaReplyParam.getStatus().equals(1)) {
|
||||
OfficialReply reply = new OfficialReply();
|
||||
reply.setStatus(0);
|
||||
officialReplyMapper.update(reply, new QueryWrapper<OfficialReply>().eq("reply_type", 3));
|
||||
}
|
||||
|
||||
OfficialReply officialReply = new OfficialReply();
|
||||
officialReply.setReplyType(3);
|
||||
officialReply.setName(channelOaReplyParam.getName());
|
||||
officialReply.setContent(channelOaReplyParam.getContent());
|
||||
officialReply.setContentType(channelOaReplyParam.getContentType());
|
||||
officialReply.setStatus(channelOaReplyParam.getStatus());
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.insert(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void edit(ChannelOaReplyParam channelOaReplyParam) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", channelOaReplyParam.getId())
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "默认回复数据不存在!");
|
||||
|
||||
if (channelOaReplyParam.getStatus().equals(1)) {
|
||||
OfficialReply reply = new OfficialReply();
|
||||
reply.setStatus(0);
|
||||
officialReplyMapper.update(reply, new QueryWrapper<OfficialReply>().eq("reply_type", officialReply.getReplyType()));
|
||||
}
|
||||
|
||||
officialReply.setId(channelOaReplyParam.getId());
|
||||
officialReply.setName(channelOaReplyParam.getName());
|
||||
officialReply.setReplyType(3);
|
||||
officialReply.setContent(channelOaReplyParam.getContent());
|
||||
officialReply.setContentType(channelOaReplyParam.getContentType());
|
||||
officialReply.setStatus(channelOaReplyParam.getStatus());
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
@Override
|
||||
public void del(Integer id) {
|
||||
OfficialReply officialReply =officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "默认回复数据不存在了!");
|
||||
|
||||
officialReply.setIsDelete(1);
|
||||
officialReply.setDeleteTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
@Override
|
||||
public void status(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("is_delete", 0)
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "默认回复数据不存在!");
|
||||
|
||||
int status = officialReply.getStatus() == 1 ? 0 : 1;
|
||||
if (status == 1) {
|
||||
OfficialReply reply = new OfficialReply();
|
||||
reply.setStatus(0);
|
||||
reply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.update(reply, new QueryWrapper<OfficialReply>()
|
||||
.eq("reply_type", officialReply.getReplyType()));
|
||||
}
|
||||
|
||||
officialReply.setId(id);
|
||||
officialReply.setStatus(status);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
package com.mdd.admin.service.channel.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mdd.admin.service.channel.IChannelOaReplyFollowService;
|
||||
import com.mdd.admin.validate.channel.ChannelOaReplyParam;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaReplyVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.entity.OfficialReply;
|
||||
import com.mdd.common.mapper.OfficialReplyMapper;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公众号默认回复服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ChannelOaReplyFollowServiceImpl implements IChannelOaReplyFollowService {
|
||||
|
||||
@Resource
|
||||
OfficialReplyMapper officialReplyMapper;
|
||||
|
||||
/**
|
||||
* 关注回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @return PageResult<ChannelOaReplyVo>
|
||||
*/
|
||||
@Override
|
||||
public PageResult<ChannelOaReplyVo> list(PageParam pageParam) {
|
||||
Integer pageNo = pageParam.getPageNo();
|
||||
Integer pageSize = pageParam.getPageSize();
|
||||
|
||||
QueryWrapper<OfficialReply> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("reply_type", 1);
|
||||
queryWrapper.eq("is_delete", 0);
|
||||
queryWrapper.orderByDesc(Arrays.asList("sort", "id"));
|
||||
IPage<OfficialReply> iPage = officialReplyMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
List<ChannelOaReplyVo> list = new LinkedList<>();
|
||||
for (OfficialReply officialReply : iPage.getRecords()) {
|
||||
ChannelOaReplyVo vo = new ChannelOaReplyVo();
|
||||
BeanUtils.copyProperties(officialReply, vo);
|
||||
list.add(vo);
|
||||
}
|
||||
|
||||
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return ChannelOaReplyDefaultVo
|
||||
*/
|
||||
@Override
|
||||
public ChannelOaReplyVo detail(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "关注回复数据不存在!");
|
||||
|
||||
ChannelOaReplyVo vo = new ChannelOaReplyVo();
|
||||
BeanUtils.copyProperties(officialReply, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复新
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void add(ChannelOaReplyParam channelOaReplyParam) {
|
||||
OfficialReply reply = new OfficialReply();
|
||||
|
||||
if (channelOaReplyParam.getStatus() == 1) {
|
||||
reply.setStatus(1);
|
||||
officialReplyMapper.update(reply, new QueryWrapper<OfficialReply>().eq("reply_type", 1));
|
||||
}
|
||||
|
||||
OfficialReply officialReply = new OfficialReply();
|
||||
officialReply.setReplyType(1);
|
||||
officialReply.setName(channelOaReplyParam.getName());
|
||||
officialReply.setContent(channelOaReplyParam.getContent());
|
||||
officialReply.setContentType(channelOaReplyParam.getContentType());
|
||||
officialReply.setStatus(channelOaReplyParam.getStatus());
|
||||
officialReply.setSort(channelOaReplyParam.getSort());
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.insert(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void edit(ChannelOaReplyParam channelOaReplyParam) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", channelOaReplyParam.getId())
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "关注回复数据不存在!");
|
||||
|
||||
if (channelOaReplyParam.getStatus() == 1) {
|
||||
OfficialReply reply = new OfficialReply();
|
||||
reply.setStatus(0);
|
||||
officialReplyMapper.update(reply, new QueryWrapper<OfficialReply>().eq("reply_type", officialReply.getReplyType()));
|
||||
}
|
||||
|
||||
officialReply.setId(channelOaReplyParam.getId());
|
||||
officialReply.setReplyType(3);
|
||||
officialReply.setName(channelOaReplyParam.getName());
|
||||
officialReply.setContent(channelOaReplyParam.getContent());
|
||||
officialReply.setContentType(channelOaReplyParam.getContentType());
|
||||
officialReply.setStatus(channelOaReplyParam.getStatus());
|
||||
officialReply.setSort(channelOaReplyParam.getSort());
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
@Override
|
||||
public void del(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "关注回复数据不存在了!");
|
||||
|
||||
officialReply.setIsDelete(1);
|
||||
officialReply.setDeleteTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
@Override
|
||||
public void status(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("is_delete", 0)
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "关注回复数据不存在!!");
|
||||
|
||||
int status = officialReply.getStatus() == 1 ? 0 : 1;
|
||||
if (status == 1) {
|
||||
OfficialReply reply = new OfficialReply();
|
||||
reply.setStatus(0);
|
||||
officialReplyMapper.update(reply, new QueryWrapper<OfficialReply>()
|
||||
.eq("reply_type", officialReply.getReplyType()));
|
||||
}
|
||||
|
||||
officialReply.setId(id);
|
||||
officialReply.setStatus(status);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
package com.mdd.admin.service.channel.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mdd.admin.service.channel.IChannelOaReplyKeywordService;
|
||||
import com.mdd.admin.validate.channel.ChannelOaReplyParam;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaReplyVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.entity.OfficialReply;
|
||||
import com.mdd.common.mapper.OfficialReplyMapper;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公众号键词回复服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ChannelOaReplyKeywordServiceImpl implements IChannelOaReplyKeywordService {
|
||||
|
||||
@Resource
|
||||
OfficialReplyMapper officialReplyMapper;
|
||||
|
||||
/**
|
||||
* 关键词回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @return List<ChannelOaReplyVo>
|
||||
*/
|
||||
@Override
|
||||
public PageResult<ChannelOaReplyVo> list(PageParam pageParam) {
|
||||
Integer pageNo = pageParam.getPageNo();
|
||||
Integer pageSize = pageParam.getPageSize();
|
||||
|
||||
QueryWrapper<OfficialReply> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("reply_type", 2);
|
||||
queryWrapper.eq("is_delete", 0);
|
||||
queryWrapper.orderByDesc(Arrays.asList("sort", "id"));
|
||||
IPage<OfficialReply> iPage = officialReplyMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
List<ChannelOaReplyVo> list = new LinkedList<>();
|
||||
for (OfficialReply officialReply : iPage.getRecords()) {
|
||||
ChannelOaReplyVo vo = new ChannelOaReplyVo();
|
||||
BeanUtils.copyProperties(officialReply, vo);
|
||||
list.add(vo);
|
||||
}
|
||||
|
||||
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return ChannelOaReplyKeywordVo
|
||||
*/
|
||||
@Override
|
||||
public ChannelOaReplyVo detail(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "数据不存在!");
|
||||
|
||||
ChannelOaReplyVo vo = new ChannelOaReplyVo();
|
||||
BeanUtils.copyProperties(officialReply, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复新
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void add(ChannelOaReplyParam channelOaReplyParam) {
|
||||
OfficialReply officialReply = new OfficialReply();
|
||||
officialReply.setReplyType(2);
|
||||
officialReply.setName(channelOaReplyParam.getName());
|
||||
officialReply.setContent(channelOaReplyParam.getContent());
|
||||
officialReply.setContentType(channelOaReplyParam.getContentType());
|
||||
officialReply.setStatus(channelOaReplyParam.getStatus());
|
||||
officialReply.setKeyword(channelOaReplyParam.getKeyword());
|
||||
officialReply.setMatchingType(channelOaReplyParam.getMatchingType());
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.insert(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param channelOaReplyParam 参数
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void edit(ChannelOaReplyParam channelOaReplyParam) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", channelOaReplyParam.getId())
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "关键词回复数据不存在!");
|
||||
|
||||
officialReply.setReplyType(2);
|
||||
officialReply.setId(channelOaReplyParam.getId());
|
||||
officialReply.setName(channelOaReplyParam.getName());
|
||||
officialReply.setContent(channelOaReplyParam.getContent());
|
||||
officialReply.setContentType(channelOaReplyParam.getContentType());
|
||||
officialReply.setStatus(channelOaReplyParam.getStatus());
|
||||
officialReply.setKeyword(channelOaReplyParam.getKeyword());
|
||||
officialReply.setMatchingType(channelOaReplyParam.getMatchingType());
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
@Override
|
||||
public void del(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "关键词回复数据不存在了!");
|
||||
|
||||
officialReply.setIsDelete(1);
|
||||
officialReply.setDeleteTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
@Override
|
||||
public void status(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("is_delete", 0)
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "关键词回复数据不存在!!");
|
||||
int status = officialReply.getStatus() == 1 ? 0 : 1;
|
||||
|
||||
officialReply.setId(id);
|
||||
officialReply.setStatus(status);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,364 +0,0 @@
|
||||
package com.mdd.admin.service.channel.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mdd.admin.service.channel.IChannelOaReplyService;
|
||||
import com.mdd.admin.validate.common.PageParam;
|
||||
import com.mdd.common.entity.OfficialReply;
|
||||
import com.mdd.common.entity.server.Sys;
|
||||
import com.mdd.common.exception.OperateException;
|
||||
import com.mdd.common.mapper.OfficialReplyMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 公众号回复服务实现类
|
||||
*/
|
||||
@Service
|
||||
public class ChannelOaReplyServiceImpl implements IChannelOaReplyService {
|
||||
|
||||
@Resource
|
||||
OfficialReplyMapper officialReplyMapper;
|
||||
|
||||
/**
|
||||
* 回复列表
|
||||
*
|
||||
* @author fzr
|
||||
* @param pageParam 分页参数
|
||||
* @param params 参数
|
||||
* @return List<Map<String, Object>>
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> list(PageParam pageParam, Map<String, String> params) {
|
||||
Integer pageNo = pageParam.getPageNo();
|
||||
Integer pageSize = pageParam.getPageSize();
|
||||
|
||||
Assert.notNull(params.get("type"), "type参数缺失");
|
||||
int type;
|
||||
switch (params.get("type")) {
|
||||
case "follow":
|
||||
type = 1;
|
||||
break;
|
||||
case "keyword":
|
||||
type = 2;
|
||||
break;
|
||||
case "default":
|
||||
type = 3;
|
||||
break;
|
||||
default:
|
||||
throw new OperateException("不被支持的类型!");
|
||||
}
|
||||
|
||||
QueryWrapper<OfficialReply> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("is_delete", 0);
|
||||
queryWrapper.orderByDesc(Arrays.asList("sort", "id"));
|
||||
queryWrapper.eq("reply_type", type);
|
||||
IPage<OfficialReply> iPage = officialReplyMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
List<Map<String, Object>> list = new LinkedList<>();
|
||||
for (OfficialReply officialReply : iPage.getRecords()) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
switch (params.get("type")) {
|
||||
case "follow":
|
||||
map.put("id", officialReply.getId());
|
||||
map.put("name", officialReply.getName());
|
||||
map.put("replyType", officialReply.getReplyType());
|
||||
map.put("contentType", officialReply.getContentType());
|
||||
map.put("content", officialReply.getContent());
|
||||
map.put("sort", officialReply.getSort());
|
||||
map.put("status", officialReply.getStatus());
|
||||
break;
|
||||
case "keyword":
|
||||
map.put("id", officialReply.getId());
|
||||
map.put("name", officialReply.getName());
|
||||
map.put("keyword", officialReply.getKeyword());
|
||||
map.put("matchingType", officialReply.getMatchingType());
|
||||
map.put("replyType", officialReply.getReplyType());
|
||||
map.put("contentType", officialReply.getContentType());
|
||||
map.put("content", officialReply.getContent());
|
||||
map.put("sort", officialReply.getSort());
|
||||
map.put("status", officialReply.getStatus());
|
||||
break;
|
||||
case "default":
|
||||
map.put("id", officialReply.getId());
|
||||
map.put("name", officialReply.getName());
|
||||
map.put("replyType", officialReply.getReplyType());
|
||||
map.put("content", officialReply.getContent());
|
||||
map.put("sort", officialReply.getSort());
|
||||
map.put("status", officialReply.getStatus());
|
||||
break;
|
||||
default:
|
||||
throw new OperateException("不被支持的类型!");
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> detail(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "数据不存在!");
|
||||
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
switch (officialReply.getReplyType()) {
|
||||
case 1:
|
||||
map.put("id", officialReply.getId());
|
||||
map.put("name", officialReply.getName());
|
||||
map.put("replyType", officialReply.getReplyType());
|
||||
map.put("contentType", officialReply.getContentType());
|
||||
map.put("content", officialReply.getContent());
|
||||
map.put("sort", officialReply.getSort());
|
||||
map.put("status", officialReply.getStatus());
|
||||
break;
|
||||
case 2:
|
||||
map.put("id", officialReply.getId());
|
||||
map.put("name", officialReply.getName());
|
||||
map.put("keyword", officialReply.getKeyword());
|
||||
map.put("replyType", officialReply.getReplyType());
|
||||
map.put("matchingType", officialReply.getMatchingType());
|
||||
map.put("contentType", officialReply.getContentType());
|
||||
map.put("content", officialReply.getContent());
|
||||
map.put("sort", officialReply.getSort());
|
||||
map.put("status", officialReply.getStatus());
|
||||
break;
|
||||
case 3:
|
||||
map.put("id", officialReply.getId());
|
||||
map.put("name", officialReply.getName());
|
||||
map.put("replyType", officialReply.getReplyType());
|
||||
map.put("content", officialReply.getContent());
|
||||
map.put("sort", officialReply.getSort());
|
||||
map.put("status", officialReply.getStatus());
|
||||
break;
|
||||
default:
|
||||
throw new OperateException("不被支持的类型!");
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复新增
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void add(Map<String, String> params) {
|
||||
String type = params.getOrDefault("type", "");
|
||||
|
||||
if (!type.equals("keyword")) {
|
||||
OfficialReply reply = new OfficialReply();
|
||||
reply.setStatus(0);
|
||||
Integer t = type.equals("follow") ? 1 : 3;
|
||||
officialReplyMapper.update(reply, new QueryWrapper<OfficialReply>()
|
||||
.eq("reply_type", t));
|
||||
}
|
||||
|
||||
OfficialReply officialReply = new OfficialReply();
|
||||
switch (type) {
|
||||
case "follow":
|
||||
Assert.notNull(params.get("name"), "规则名称不能为空");
|
||||
Assert.notNull(params.get("contentType"), "请正确选择回复类型");
|
||||
Assert.notNull(params.get("content"), "回复内容不能为空");
|
||||
Assert.notNull(params.get("sort"), "排序号不能为空");
|
||||
Assert.notNull(params.get("status"), "请正确选择状态");
|
||||
officialReply.setName(params.get("name"));
|
||||
officialReply.setReplyType(1);
|
||||
officialReply.setSort(Integer.parseInt(params.get("sort")));
|
||||
officialReply.setContentType(Integer.parseInt(params.get("contentType")));
|
||||
officialReply.setContent(params.get("content"));
|
||||
officialReply.setStatus(Integer.parseInt(params.get("status")));
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.insert(officialReply);
|
||||
break;
|
||||
case "keyword":
|
||||
Assert.notNull(params.get("name"), "规则名称不能为空");
|
||||
Assert.notNull(params.get("keyword"), "关键词不能为空");
|
||||
Assert.notNull(params.get("matchingType"), "请正确选择匹配模式");
|
||||
Assert.notNull(params.get("contentType"), "请正确选择回复类型");
|
||||
Assert.notNull(params.get("content"), "回复内容不能为空");
|
||||
Assert.notNull(params.get("status"), "请正确选择状态");
|
||||
officialReply.setName(params.get("name"));
|
||||
officialReply.setKeyword(params.get("keyword"));
|
||||
officialReply.setMatchingType(Integer.parseInt(params.get("matchingType")));
|
||||
officialReply.setReplyType(2);
|
||||
officialReply.setContent(params.get("content"));
|
||||
officialReply.setContentType(Integer.parseInt(params.get("contentType")));
|
||||
officialReply.setStatus(Integer.parseInt(params.get("status")));
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.insert(officialReply);
|
||||
break;
|
||||
case "default":
|
||||
Assert.notNull(params.get("name"), "规则名称不能为空");
|
||||
Assert.notNull(params.get("contentType"), "请正确选择回复类型");
|
||||
Assert.notNull(params.get("content"), "回复内容不能为空");
|
||||
Assert.notNull(params.get("status"), "请正确选择状态");
|
||||
officialReply.setName(params.get("name"));
|
||||
officialReply.setReplyType(3);
|
||||
officialReply.setContent(params.get("content"));
|
||||
officialReply.setContentType(Integer.parseInt(params.get("contentType")));
|
||||
officialReply.setStatus(Integer.parseInt(params.get("status")));
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.insert(officialReply);
|
||||
break;
|
||||
default:
|
||||
throw new OperateException("不被支持的类型");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void edit(Map<String, String> params) {
|
||||
Assert.notNull(params.get("id"), "id参数缺失");
|
||||
Integer id = Integer.parseInt(params.get("id"));
|
||||
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "数据不存在!");
|
||||
|
||||
if (officialReply.getReplyType() != 2) {
|
||||
OfficialReply reply = new OfficialReply();
|
||||
reply.setStatus(0);
|
||||
officialReplyMapper.update(reply, new QueryWrapper<OfficialReply>()
|
||||
.eq("reply_type", officialReply.getReplyType() ));
|
||||
}
|
||||
|
||||
switch (officialReply.getReplyType()) {
|
||||
case 1:
|
||||
Assert.notNull(params.get("name"), "规则名称不能为空");
|
||||
Assert.notNull(params.get("contentType"), "请正确选择回复类型");
|
||||
Assert.notNull(params.get("content"), "回复内容不能为空");
|
||||
Assert.notNull(params.get("sort"), "排序号不能为空");
|
||||
Assert.notNull(params.get("status"), "请正确选择状态");
|
||||
officialReply.setId(id);
|
||||
officialReply.setName(params.get("name"));
|
||||
officialReply.setReplyType(1);
|
||||
officialReply.setSort(Integer.parseInt(params.get("sort")));
|
||||
officialReply.setContentType(Integer.parseInt(params.get("contentType")));
|
||||
officialReply.setContent(params.get("content"));
|
||||
officialReply.setStatus(Integer.parseInt(params.get("status")));
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
break;
|
||||
case 2:
|
||||
Assert.notNull(params.get("name"), "规则名称不能为空");
|
||||
Assert.notNull(params.get("keyword"), "关键词不能为空");
|
||||
Assert.notNull(params.get("matchingType"), "请正确选择匹配模式");
|
||||
Assert.notNull(params.get("contentType"), "请正确选择回复类型");
|
||||
Assert.notNull(params.get("content"), "回复内容不能为空");
|
||||
Assert.notNull(params.get("status"), "请正确选择状态");
|
||||
officialReply.setId(id);
|
||||
officialReply.setName(params.get("name"));
|
||||
officialReply.setKeyword(params.get("keyword"));
|
||||
officialReply.setMatchingType(Integer.parseInt(params.get("matchingType")));
|
||||
officialReply.setReplyType(2);
|
||||
officialReply.setContent(params.get("content"));
|
||||
officialReply.setContentType(Integer.parseInt(params.get("contentType")));
|
||||
officialReply.setStatus(Integer.parseInt(params.get("status")));
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
break;
|
||||
case 3:
|
||||
Assert.notNull(params.get("name"), "规则名称不能为空");
|
||||
Assert.notNull(params.get("contentType"), "请正确选择回复类型");
|
||||
Assert.notNull(params.get("content"), "回复内容不能为空");
|
||||
Assert.notNull(params.get("status"), "请正确选择状态");
|
||||
officialReply.setId(id);
|
||||
officialReply.setName(params.get("name"));
|
||||
officialReply.setReplyType(3);
|
||||
officialReply.setContent(params.get("content"));
|
||||
officialReply.setContentType(Integer.parseInt(params.get("contentType")));
|
||||
officialReply.setStatus(Integer.parseInt(params.get("status")));
|
||||
officialReply.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
break;
|
||||
default:
|
||||
throw new OperateException("不被支持的类型");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复删除
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
@Override
|
||||
public void del(Integer id) {
|
||||
OfficialReply officialReply =officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "数据不存在!");
|
||||
|
||||
officialReply.setIsDelete(1);
|
||||
officialReply.setDeleteTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复状态
|
||||
*
|
||||
* @author fzr
|
||||
* @param id 主键
|
||||
*/
|
||||
@Override
|
||||
public void status(Integer id) {
|
||||
OfficialReply officialReply = officialReplyMapper.selectOne(new QueryWrapper<OfficialReply>()
|
||||
.eq("is_delete", 0)
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(officialReply, "数据不存在!");
|
||||
|
||||
int status = officialReply.getStatus() == 1 ? 0 : 1;
|
||||
if (officialReply.getReplyType() != 2 && status == 1) {
|
||||
OfficialReply reply = new OfficialReply();
|
||||
reply.setStatus(0);
|
||||
officialReplyMapper.update(reply, new QueryWrapper<OfficialReply>()
|
||||
.eq("reply_type", officialReply.getReplyType()));
|
||||
}
|
||||
|
||||
officialReply.setId(id);
|
||||
officialReply.setStatus(status);
|
||||
officialReply.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
officialReplyMapper.updateById(officialReply);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.mdd.admin.service.channel.impl;
|
||||
|
||||
import com.mdd.admin.service.channel.IChannelOaService;
|
||||
import com.mdd.admin.validate.channel.ChannelOaParam;
|
||||
import com.mdd.admin.vo.channel.ChannelOaVo;
|
||||
import com.mdd.common.utils.ConfigUtil;
|
||||
import com.mdd.common.utils.RequestUtil;
|
||||
import com.mdd.common.utils.UrlUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -19,47 +20,48 @@ public class ChannelOaServiceImpl implements IChannelOaService {
|
||||
* 公众号渠道设置详情
|
||||
*
|
||||
* @author fzr
|
||||
* @return Map<String, Object>
|
||||
* @return ChannelOaVo
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> detail() {
|
||||
public ChannelOaVo detail() {
|
||||
Map<String, String> config = ConfigUtil.get("oa_channel");
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("name", config.getOrDefault("name", ""));
|
||||
map.put("primaryId", config.getOrDefault("primaryId", ""));
|
||||
map.put("qrCode", UrlUtil.toAbsoluteUrl(config.getOrDefault("qrCode", "")));
|
||||
map.put("appId", config.getOrDefault("appId", ""));
|
||||
map.put("appSecret", config.getOrDefault("appSecret", ""));
|
||||
map.put("url", config.getOrDefault("url", ""));
|
||||
map.put("token", config.getOrDefault("token", ""));
|
||||
map.put("encodingAesKey", config.getOrDefault("encodingAesKey", ""));
|
||||
map.put("encryptionType", Integer.parseInt(config.getOrDefault("encryptionType", "1")));
|
||||
ChannelOaVo vo = new ChannelOaVo();
|
||||
|
||||
vo.setQrCode(UrlUtil.toAbsoluteUrl(config.getOrDefault("qrCode", "")));
|
||||
vo.setName(config.getOrDefault("name", ""));
|
||||
vo.setPrimaryId(config.getOrDefault("primaryId", ""));
|
||||
vo.setAppId(config.getOrDefault("appId", ""));
|
||||
vo.setAppSecret(config.getOrDefault("appSecret", ""));
|
||||
vo.setUrl(config.getOrDefault("url", ""));
|
||||
vo.setToken(config.getOrDefault("token", ""));
|
||||
vo.setEncodingAesKey(config.getOrDefault("encodingAesKey", ""));
|
||||
vo.setEncryptionType(Integer.parseInt(config.getOrDefault("encryptionType", "1")));
|
||||
|
||||
String domain = RequestUtil.domain();
|
||||
map.put("businessDomain", domain);
|
||||
map.put("jsDomain", domain);
|
||||
map.put("webDomain", domain);
|
||||
vo.setBusinessDomain(domain);
|
||||
vo.setJsDomain(domain);
|
||||
vo.setWebDomain(domain);
|
||||
|
||||
return map;
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 公众号渠道设置保存
|
||||
*
|
||||
* @author fzr
|
||||
* @param param 参数
|
||||
* @param channelOaParam 参数
|
||||
*/
|
||||
@Override
|
||||
public void save(Map<String, String> param) {
|
||||
ConfigUtil.set("oa_channel", "name", param.getOrDefault("name", ""));
|
||||
ConfigUtil.set("oa_channel", "primaryId", param.getOrDefault("primaryId", ""));
|
||||
ConfigUtil.set("oa_channel", "qrCode", UrlUtil.toRelativeUrl(param.getOrDefault("qrCode", "")));
|
||||
ConfigUtil.set("oa_channel", "appId", param.getOrDefault("appId", ""));
|
||||
ConfigUtil.set("oa_channel", "appSecret", param.getOrDefault("appSecret", ""));
|
||||
ConfigUtil.set("oa_channel", "url", param.getOrDefault("url", ""));
|
||||
ConfigUtil.set("oa_channel", "token", param.getOrDefault("token", ""));
|
||||
ConfigUtil.set("oa_channel", "encodingAesKey", param.getOrDefault("encodingAesKey", ""));
|
||||
ConfigUtil.set("oa_channel", "encryptionType", param.getOrDefault("encryptionType", ""));
|
||||
public void save(ChannelOaParam channelOaParam) {
|
||||
ConfigUtil.set("oa_channel", "name", channelOaParam.getName());
|
||||
ConfigUtil.set("oa_channel", "primaryId", channelOaParam.getPrimaryId());
|
||||
ConfigUtil.set("oa_channel", "qrCode", UrlUtil.toRelativeUrl(channelOaParam.getQrCode()));
|
||||
ConfigUtil.set("oa_channel", "appId", channelOaParam.getAppId());
|
||||
ConfigUtil.set("oa_channel", "appSecret", channelOaParam.getAppSecret());
|
||||
ConfigUtil.set("oa_channel", "url", channelOaParam.getUrl());
|
||||
ConfigUtil.set("oa_channel", "token", channelOaParam.getToken());
|
||||
ConfigUtil.set("oa_channel", "encodingAesKey", channelOaParam.getEncodingAesKey());
|
||||
ConfigUtil.set("oa_channel", "encryptionType", String.valueOf(channelOaParam.getEncryptionType()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,12 +36,6 @@ public class ArticleParam extends BaseParam {
|
||||
@Length(max = 200, message = "图片链接过长不能超200个字符", groups = {create.class, update.class})
|
||||
private String image = "";
|
||||
|
||||
private String content = "";
|
||||
|
||||
private String summary = "";
|
||||
|
||||
private Integer visit = 0;
|
||||
|
||||
@Length(max = 32, message = "作者名称不能超32个字符", groups = {create.class, update.class})
|
||||
private String author = "";
|
||||
|
||||
@@ -53,4 +47,10 @@ public class ArticleParam extends BaseParam {
|
||||
@IntegerContains(values = {0, 1}, message = "isShow不是合法值", groups = {create.class, update.class})
|
||||
private Integer isShow;
|
||||
|
||||
private String content = "";
|
||||
|
||||
private String summary = "";
|
||||
|
||||
private Integer visit = 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.admin.validate.BaseParam;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* H5渠道参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class ChannelH5Param extends BaseParam {
|
||||
|
||||
@NotNull(message = "status参数缺失")
|
||||
@IntegerContains(values = {0, 1}, message = "status不是合法值")
|
||||
private Integer status;
|
||||
|
||||
@NotNull(message = "close参数确实")
|
||||
@IntegerContains(values = {0, 1}, message = "close不是合法值")
|
||||
private Integer close;
|
||||
|
||||
@Length(max = 500, message = "url不能超500个字符")
|
||||
private String url;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.admin.validate.BaseParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
/**
|
||||
* 小程序渠道参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class ChannelMpParam extends BaseParam {
|
||||
|
||||
@Length(max = 100, message = "小程序名称不能超100个字符")
|
||||
private String name = "";
|
||||
|
||||
@Length(max = 100, message = "原始ID不能超100个字符")
|
||||
private String primaryId = "";
|
||||
|
||||
@Length(max = 100, message = "appId不能超100个字符")
|
||||
private String appId = "";
|
||||
|
||||
@Length(max = 200, message = "appSecret不能超100个字符")
|
||||
private String appSecret = "";
|
||||
|
||||
@Length(max = 300, message = "小程序码不能超300个字符")
|
||||
private String qrCode = "";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.admin.validate.BaseParam;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
/**
|
||||
* 公众号渠道参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class ChannelOaParam extends BaseParam {
|
||||
|
||||
@Length(max = 100, message = "小程序名称不能超100个字符")
|
||||
private String name = "";
|
||||
|
||||
@Length(max = 100, message = "原始ID不能超100个字符")
|
||||
private String primaryId = "";
|
||||
|
||||
@Length(max = 100, message = "appId不能超100个字符")
|
||||
private String appId = "";
|
||||
|
||||
@Length(max = 200, message = "appSecret不能超100个字符")
|
||||
private String appSecret = "";
|
||||
|
||||
@Length(max = 300, message = "小程序码不能超300个字符")
|
||||
private String qrCode = "";
|
||||
|
||||
@Length(max = 300, message = "URL不能超300个字符")
|
||||
private String url = "";
|
||||
|
||||
@Length(max = 200, message = "Token不能超200个字符")
|
||||
private String token = "";
|
||||
|
||||
@Length(max = 43, message = "EncodingAESKey不能超43个字符")
|
||||
private String encodingAesKey = "";
|
||||
|
||||
@IntegerContains(values = {1, 2, 3}, message = "encryptionType不是合法值")
|
||||
private Integer encryptionType = 1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.mdd.admin.validate.channel;
|
||||
|
||||
import com.mdd.admin.validate.BaseParam;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 渠道公众号回复管理参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class ChannelOaReplyParam extends BaseParam {
|
||||
|
||||
public interface defaults{}
|
||||
public interface keywords{}
|
||||
public interface follow{}
|
||||
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "name参数缺失", groups = {defaults.class, keywords.class, follow.class})
|
||||
@NotEmpty(message = "规则名称不能为空", groups = {defaults.class, keywords.class, follow.class})
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "content参数缺失", groups = {defaults.class, keywords.class, follow.class})
|
||||
@NotEmpty(message = "回复内容不能为空", groups = {defaults.class, keywords.class, follow.class})
|
||||
private String content;
|
||||
|
||||
@NotNull(message = "contentType参数缺失", groups = {defaults.class, keywords.class, follow.class})
|
||||
@IntegerContains(values = {1, 2}, message = "contentType值不符合规范", groups = {defaults.class, keywords.class, follow.class})
|
||||
private Integer contentType;
|
||||
|
||||
@NotNull(message = "status参数缺失", groups = {defaults.class, keywords.class, follow.class})
|
||||
@IntegerContains(values = {0, 1}, message = "状态选择异常", groups = {defaults.class, keywords.class, follow.class})
|
||||
private Integer status;
|
||||
|
||||
@NotNull(message = "keyword参数缺失", groups = {keywords.class})
|
||||
@NotEmpty(message = "关键词不能为空", groups = {keywords.class})
|
||||
private String keyword;
|
||||
|
||||
@NotNull(message = "matchingType参数缺失", groups = {keywords.class})
|
||||
@IntegerContains(values = {1, 2}, message = "匹配方式异常", groups = {defaults.class, keywords.class, follow.class})
|
||||
private Integer matchingType;
|
||||
|
||||
@NotNull(message = "sort参数缺失", groups = {follow.class})
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.mdd.admin.validate.common;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* ID参数
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class IDParam {
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
private Integer id;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.mdd.admin.vo.channel;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* H5渠道Vo
|
||||
*/
|
||||
@Data
|
||||
public class ChannelH5Vo {
|
||||
|
||||
private Integer status; // 是否关闭
|
||||
private Integer close; // 关闭类型
|
||||
private String url; // 关闭访问
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.mdd.admin.vo.channel;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 小程序渠道Vo
|
||||
*/
|
||||
@Data
|
||||
public class ChannelMpVo {
|
||||
|
||||
private String name;
|
||||
private String primaryId;
|
||||
private String appId;
|
||||
private String appSecret;
|
||||
private String qrCode;
|
||||
|
||||
private String requestDomain;
|
||||
private String socketDomain;
|
||||
private String uploadFileDomain;
|
||||
private String downloadFileDomain;
|
||||
private String udpDomain;
|
||||
private String tcpDomain;
|
||||
private String businessDomain;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.mdd.admin.vo.channel;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChannelOaReplyVo {
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String keyword;
|
||||
private String content;
|
||||
private Integer replyType;
|
||||
private Integer contentType;
|
||||
private Integer matchingType;
|
||||
private Integer sort;
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.mdd.admin.vo.channel;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 公众号渠道Vo
|
||||
*/
|
||||
@Data
|
||||
public class ChannelOaVo {
|
||||
|
||||
private String name;
|
||||
private String primaryId;
|
||||
private String appId;
|
||||
private String appSecret;
|
||||
private String qrCode;
|
||||
private String url;
|
||||
private String token;
|
||||
private String encodingAesKey ;
|
||||
private Integer encryptionType;
|
||||
|
||||
private String businessDomain;
|
||||
private String jsDomain;
|
||||
private String webDomain;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user