Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop
This commit is contained in:
commit
ea203d69a4
@ -116,7 +116,7 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
|
||||
|
||||
#### 移动端
|
||||
|
||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="width:300px;" />
|
||||
<img src="https://pickmall.cn/assets/imgs/other/app.gif" alt="移动端功能展示" style="zoom:50%;" />
|
||||
|
||||
|
||||
|
||||
|
@ -55,7 +55,6 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
|
||||
public void sendSmsCode(String mobile, VerificationEnums verificationEnums, String uuid) {
|
||||
|
||||
String code = CommonUtil.getRandomNum();
|
||||
code = "111111";
|
||||
|
||||
switch (verificationEnums) {
|
||||
//如果某个模版需要自定义,则在此处进行调整
|
||||
@ -67,7 +66,7 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("code", code);
|
||||
cache.put(cacheKey(verificationEnums, mobile, uuid), code, 300L);
|
||||
//this.sendSmsCode("北京宏业汇成科技有限公司",mobile, params, verificationEnums.getSmsTemplate());
|
||||
this.sendSmsCode("北京宏业汇成科技有限公司", mobile, params, "SMS_205755300");
|
||||
break;
|
||||
}
|
||||
case UPDATE_PASSWORD: {
|
||||
@ -80,7 +79,7 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("code", code);
|
||||
cache.put(cacheKey(verificationEnums, memberMobile, uuid), code, 300L);
|
||||
//this.sendSmsCode("北京宏业汇成科技有限公司",mobile, params, verificationEnums.getSmsTemplate());
|
||||
this.sendSmsCode("北京宏业汇成科技有限公司", mobile, params, "SMS_205755297");
|
||||
break;
|
||||
}
|
||||
//如果不是有效的验证码手段,则此处不进行短信操作
|
||||
@ -161,13 +160,17 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
|
||||
public void addSmsSign(SmsSign smsSign) throws Exception {
|
||||
//设置参数添加短信签名
|
||||
com.aliyun.dysmsapi20170525.Client client = this.createClient();
|
||||
|
||||
System.out.println(smsSign.getBusinessLicense().substring(smsSign.getBusinessLicense().lastIndexOf(".") + 1));
|
||||
System.out.println(smsSign.getLicense().substring(smsSign.getLicense().lastIndexOf(".")));
|
||||
//营业执照
|
||||
AddSmsSignRequest.AddSmsSignRequestSignFileList signFileList0 = new AddSmsSignRequest.AddSmsSignRequestSignFileList()
|
||||
.setFileContents(Base64Utils.encode(smsSign.getBusinessLicense()))
|
||||
.setFileSuffix(smsSign.getBusinessLicense().substring(smsSign.getBusinessLicense().lastIndexOf(".") + 1));
|
||||
//授权委托书
|
||||
AddSmsSignRequest.AddSmsSignRequestSignFileList signFileList1 = new AddSmsSignRequest.AddSmsSignRequestSignFileList()
|
||||
.setFileContents(Base64Utils.encode(smsSign.getLicense()))
|
||||
.setFileSuffix(smsSign.getLicense().substring(smsSign.getBusinessLicense().lastIndexOf(".") + 1));
|
||||
.setFileSuffix(smsSign.getLicense().substring(smsSign.getLicense().lastIndexOf(".")) + 1);
|
||||
//添加短信签名
|
||||
AddSmsSignRequest addSmsSignRequest = new AddSmsSignRequest()
|
||||
.setSignName(smsSign.getSignName())
|
||||
.setSignSource(smsSign.getSignSource())
|
||||
|
@ -24,6 +24,10 @@ public enum ArticleEnum {
|
||||
* 证照信息
|
||||
*/
|
||||
LICENSE_INFORMATION,
|
||||
/**
|
||||
* 店铺入驻
|
||||
*/
|
||||
STORE_REGISTER,
|
||||
/**
|
||||
* 其他文章
|
||||
*/
|
||||
|
@ -69,4 +69,12 @@ public interface ArticleService extends IService<Article> {
|
||||
*/
|
||||
@Cacheable(key = "#type")
|
||||
Article customGetByType(String type);
|
||||
|
||||
/**
|
||||
* 修改文章状态
|
||||
* @param id 文章ID
|
||||
* @param status 显示状态
|
||||
*/
|
||||
@CacheEvict(key = "#id")
|
||||
Boolean updateArticleStatus(String id,boolean status);
|
||||
}
|
@ -3,6 +3,7 @@ package cn.lili.modules.page.serviceimpl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.SwitchEnum;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.utils.BeanUtil;
|
||||
import cn.lili.common.utils.PageUtil;
|
||||
@ -18,7 +19,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -34,9 +34,6 @@ import java.util.List;
|
||||
@Transactional
|
||||
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService {
|
||||
|
||||
@Autowired
|
||||
private ArticleMapper articleMapper;
|
||||
|
||||
@Override
|
||||
public IPage<ArticleVO> articlePage(ArticleSearchParams articleSearchParams) {
|
||||
articleSearchParams.setSort("a.sort");
|
||||
@ -82,4 +79,11 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> impl
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateArticleStatus(String id, boolean status) {
|
||||
Article article=this.getById(id);
|
||||
article.setOpenStatus(status? SwitchEnum.OPEN.name():SwitchEnum.CLOSE.name());
|
||||
return this.updateById(article);
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package cn.lili.modules.page.serviceimpl;
|
||||
|
||||
import cn.lili.common.enums.SwitchEnum;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.SwitchEnum;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.common.utils.PageUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
@ -18,8 +18,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@ -30,8 +28,6 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
public class PageDataServiceImpl extends ServiceImpl<PageDataMapper, PageData> implements PageDataService {
|
||||
@Autowired
|
||||
private PageDataMapper pageDataMapper;
|
||||
|
||||
@Override
|
||||
public void addStorePageData(String storeId) {
|
||||
@ -116,7 +112,7 @@ public class PageDataServiceImpl extends ServiceImpl<PageDataMapper, PageData> i
|
||||
queryWrapper.eq(pageData.getNum() != null, "num", pageData.getNum());
|
||||
}
|
||||
//判断是否为唯一的页面
|
||||
if (pageDataMapper.getPageDataNum(queryWrapper) == 1) {
|
||||
if (this.baseMapper.getPageDataNum(queryWrapper) == 1) {
|
||||
throw new ServiceException(ResultCode.PAGE_DELETE_ERROR);
|
||||
}
|
||||
return this.removeById(id);
|
||||
@ -136,7 +132,7 @@ public class PageDataServiceImpl extends ServiceImpl<PageDataMapper, PageData> i
|
||||
|
||||
queryWrapper.eq("page_client_type", pageDataDTO.getPageClientType());
|
||||
|
||||
return pageDataMapper.getPageData(queryWrapper);
|
||||
return this.baseMapper.getPageData(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -146,7 +142,7 @@ public class PageDataServiceImpl extends ServiceImpl<PageDataMapper, PageData> i
|
||||
queryWrapper.eq(pageDataDTO.getNum() != null, "num", pageDataDTO.getNum());
|
||||
queryWrapper.eq(pageDataDTO.getPageClientType() != null, "page_client_type", pageDataDTO.getPageClientType());
|
||||
|
||||
return pageDataMapper.getPageDataList(PageUtil.initPage(pageVO), queryWrapper);
|
||||
return this.baseMapper.getPageDataList(PageUtil.initPage(pageVO), queryWrapper);
|
||||
|
||||
}
|
||||
}
|
@ -18,9 +18,6 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class SpecialServiceImpl extends ServiceImpl<SpecialMapper, Special> implements SpecialService {
|
||||
|
||||
//专题
|
||||
@Autowired
|
||||
private SpecialMapper specialMapper;
|
||||
//页面数据
|
||||
@Autowired
|
||||
private PageDataService pageDataService;
|
||||
|
@ -13,7 +13,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -46,8 +45,8 @@ public class ArticleManagerController {
|
||||
|
||||
@ApiOperation(value = "分页获取")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "categoryId", value = "文章分类ID", dataType = "String", paramType = "query"),
|
||||
@ApiImplicitParam(name = "title", value = "标题", dataType = "String", paramType = "query")
|
||||
@ApiImplicitParam(name = "categoryId", value = "文章分类ID", paramType = "query"),
|
||||
@ApiImplicitParam(name = "title", value = "标题", paramType = "query")
|
||||
})
|
||||
@GetMapping(value = "/getByPage")
|
||||
public ResultMessage<IPage<ArticleVO>> getByPage(ArticleSearchParams articleSearchParams) {
|
||||
@ -63,13 +62,27 @@ public class ArticleManagerController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改文章")
|
||||
@ApiImplicitParam(name = "id", value = "文章ID", required = true, dataType = "String", paramType = "path")
|
||||
@ApiImplicitParam(name = "id", value = "文章ID", required = true, paramType = "path")
|
||||
@PutMapping("update/{id}")
|
||||
public ResultMessage<Article> update(@Valid Article article, @PathVariable("id") String id) {
|
||||
article.setId(id);
|
||||
return ResultUtil.data(articleService.updateArticle(article));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改文章状态")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "文章ID", required = true, paramType = "path"),
|
||||
@ApiImplicitParam(name = "status", value = "操作状态", required = true, paramType = "query")
|
||||
})
|
||||
@PutMapping("update/status/{id}")
|
||||
public ResultMessage<Article> updateStatus(@PathVariable("id") String id,boolean status) {
|
||||
if(articleService.updateArticleStatus(id,status)){
|
||||
return ResultUtil.success(ResultCode.SUCCESS);
|
||||
}
|
||||
return ResultUtil.error(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "批量删除")
|
||||
@ApiImplicitParam(name = "id", value = "文章ID", required = true, dataType = "String", paramType = "path")
|
||||
@DeleteMapping(value = "/delByIds/{id}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user