商城模块 微信模块优化
This commit is contained in:
@ -1,15 +1,12 @@
|
||||
package co.yixiang.mp.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.mp.domain.YxArticle;
|
||||
import co.yixiang.mp.service.YxArticleService;
|
||||
import co.yixiang.mp.service.dto.YxArticleDTO;
|
||||
import co.yixiang.mp.service.dto.YxArticleQueryCriteria;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@ -23,14 +20,16 @@ import java.util.Date;
|
||||
* @author hupeng
|
||||
* @date 2019-10-07
|
||||
*/
|
||||
@Api(tags = "图文管理")
|
||||
@Api(tags = "商城:微信图文管理")
|
||||
@RestController
|
||||
@RequestMapping("api")
|
||||
public class YxArticleController {
|
||||
public class WechatArticleController {
|
||||
|
||||
@Autowired
|
||||
private YxArticleService yxArticleService;
|
||||
private final YxArticleService yxArticleService;
|
||||
|
||||
public WechatArticleController(YxArticleService yxArticleService) {
|
||||
this.yxArticleService = yxArticleService;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxArticle")
|
@ -25,15 +25,16 @@ import org.springframework.web.bind.annotation.*;
|
||||
* @author hupeng
|
||||
* @date 2019-10-06
|
||||
*/
|
||||
@Api(tags = "微信菜單")
|
||||
@Api(tags = "商城:微信菜單")
|
||||
@RestController
|
||||
@RequestMapping("api")
|
||||
public class YxCacheController {
|
||||
|
||||
@Autowired
|
||||
private YxCacheService yxCacheService;
|
||||
public class WechatMenuController {
|
||||
|
||||
private final YxCacheService yxCacheService;
|
||||
|
||||
public WechatMenuController(YxCacheService yxCacheService) {
|
||||
this.yxCacheService = yxCacheService;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询菜单")
|
||||
@GetMapping(value = "/yxCache")
|
@ -1,8 +1,6 @@
|
||||
package co.yixiang.mp.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.mp.domain.YxWechatReply;
|
||||
import co.yixiang.mp.service.YxWechatReplyService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@ -19,14 +17,16 @@ import org.springframework.web.bind.annotation.*;
|
||||
* @author hupeng
|
||||
* @date 2019-10-10
|
||||
*/
|
||||
@Api(tags = "微信回復管理")
|
||||
@Api(tags = "商城:微信回復管理")
|
||||
@RestController
|
||||
@RequestMapping("api")
|
||||
public class YxWechatReplyController {
|
||||
public class WechatReplyController {
|
||||
|
||||
@Autowired
|
||||
private YxWechatReplyService yxWechatReplyService;
|
||||
private final YxWechatReplyService yxWechatReplyService;
|
||||
|
||||
public WechatReplyController(YxWechatReplyService yxWechatReplyService) {
|
||||
this.yxWechatReplyService = yxWechatReplyService;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxWechatReply")
|
@ -1,7 +1,5 @@
|
||||
package co.yixiang.mp.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.mp.domain.YxWechatTemplate;
|
||||
import co.yixiang.mp.service.YxWechatTemplateService;
|
||||
import co.yixiang.mp.service.dto.YxWechatTemplateQueryCriteria;
|
||||
@ -19,13 +17,16 @@ import org.springframework.web.bind.annotation.*;
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-10
|
||||
*/
|
||||
@Api(tags = "微信模板管理")
|
||||
@Api(tags = "商城:微信模板管理")
|
||||
@RestController
|
||||
@RequestMapping("api")
|
||||
public class YxWechatTemplateController {
|
||||
public class WechatTemplateController {
|
||||
|
||||
@Autowired
|
||||
private YxWechatTemplateService yxWechatTemplateService;
|
||||
private final YxWechatTemplateService yxWechatTemplateService;
|
||||
|
||||
public WechatTemplateController(YxWechatTemplateService yxWechatTemplateService) {
|
||||
this.yxWechatTemplateService = yxWechatTemplateService;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxWechatTemplate")
|
@ -28,7 +28,6 @@ import me.chanjar.weixin.mp.bean.material.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMassSendResult;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@ -50,12 +49,14 @@ import java.util.Optional;
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxArticleServiceImpl implements YxArticleService {
|
||||
|
||||
@Autowired
|
||||
private YxArticleRepository yxArticleRepository;
|
||||
private final YxArticleRepository yxArticleRepository;
|
||||
|
||||
@Autowired
|
||||
private YxArticleMapper yxArticleMapper;
|
||||
private final YxArticleMapper yxArticleMapper;
|
||||
|
||||
public YxArticleServiceImpl(YxArticleRepository yxArticleRepository, YxArticleMapper yxArticleMapper) {
|
||||
this.yxArticleRepository = yxArticleRepository;
|
||||
this.yxArticleMapper = yxArticleMapper;
|
||||
}
|
||||
|
||||
@Value("${file.path}")
|
||||
private String uploadDirStr;
|
||||
|
@ -10,7 +10,6 @@ import co.yixiang.mp.service.mapper.YxCacheMapper;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -29,11 +28,14 @@ import java.util.Optional;
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxCacheServiceImpl implements YxCacheService {
|
||||
|
||||
@Autowired
|
||||
private YxCacheRepository yxCacheRepository;
|
||||
private final YxCacheRepository yxCacheRepository;
|
||||
|
||||
@Autowired
|
||||
private YxCacheMapper yxCacheMapper;
|
||||
private final YxCacheMapper yxCacheMapper;
|
||||
|
||||
public YxCacheServiceImpl(YxCacheRepository yxCacheRepository, YxCacheMapper yxCacheMapper) {
|
||||
this.yxCacheRepository = yxCacheRepository;
|
||||
this.yxCacheMapper = yxCacheMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxCacheQueryCriteria criteria, Pageable pageable){
|
||||
|
@ -10,7 +10,6 @@ import co.yixiang.mp.service.mapper.YxWechatReplyMapper;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -29,11 +28,14 @@ import java.util.Optional;
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxWechatReplyServiceImpl implements YxWechatReplyService {
|
||||
|
||||
@Autowired
|
||||
private YxWechatReplyRepository yxWechatReplyRepository;
|
||||
private final YxWechatReplyRepository yxWechatReplyRepository;
|
||||
|
||||
@Autowired
|
||||
private YxWechatReplyMapper yxWechatReplyMapper;
|
||||
private final YxWechatReplyMapper yxWechatReplyMapper;
|
||||
|
||||
public YxWechatReplyServiceImpl(YxWechatReplyRepository yxWechatReplyRepository, YxWechatReplyMapper yxWechatReplyMapper) {
|
||||
this.yxWechatReplyRepository = yxWechatReplyRepository;
|
||||
this.yxWechatReplyMapper = yxWechatReplyMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxWechatReplyQueryCriteria criteria, Pageable pageable){
|
||||
|
@ -27,11 +27,14 @@ import java.util.Map;
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxWechatTemplateServiceImpl implements YxWechatTemplateService {
|
||||
|
||||
@Autowired
|
||||
private YxWechatTemplateRepository yxWechatTemplateRepository;
|
||||
private final YxWechatTemplateRepository yxWechatTemplateRepository;
|
||||
|
||||
@Autowired
|
||||
private YxWechatTemplateMapper yxWechatTemplateMapper;
|
||||
private final YxWechatTemplateMapper yxWechatTemplateMapper;
|
||||
|
||||
public YxWechatTemplateServiceImpl(YxWechatTemplateRepository yxWechatTemplateRepository, YxWechatTemplateMapper yxWechatTemplateMapper) {
|
||||
this.yxWechatTemplateRepository = yxWechatTemplateRepository;
|
||||
this.yxWechatTemplateMapper = yxWechatTemplateMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxWechatTemplate findByTempkey(String key) {
|
||||
|
Reference in New Issue
Block a user