diff --git a/README.md b/README.md
index 2ec84fdb..6994b0e5 100644
--- a/README.md
+++ b/README.md
@@ -116,7 +116,7 @@ PS:单独部署的话,数据库文件访问这里:https://gitee.com/beijing_
#### 移动端
-
+
diff --git a/framework/src/main/java/cn/lili/common/sms/impl/SmsUtilAliImplService.java b/framework/src/main/java/cn/lili/common/sms/impl/SmsUtilAliImplService.java
index 2e2ec190..d99be26a 100644
--- a/framework/src/main/java/cn/lili/common/sms/impl/SmsUtilAliImplService.java
+++ b/framework/src/main/java/cn/lili/common/sms/impl/SmsUtilAliImplService.java
@@ -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 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 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())
diff --git a/framework/src/main/java/cn/lili/modules/page/entity/enums/ArticleEnum.java b/framework/src/main/java/cn/lili/modules/page/entity/enums/ArticleEnum.java
index 6a92d460..d2c93723 100644
--- a/framework/src/main/java/cn/lili/modules/page/entity/enums/ArticleEnum.java
+++ b/framework/src/main/java/cn/lili/modules/page/entity/enums/ArticleEnum.java
@@ -24,6 +24,10 @@ public enum ArticleEnum {
* 证照信息
*/
LICENSE_INFORMATION,
+ /**
+ * 店铺入驻
+ */
+ STORE_REGISTER,
/**
* 其他文章
*/
diff --git a/framework/src/main/java/cn/lili/modules/page/service/ArticleService.java b/framework/src/main/java/cn/lili/modules/page/service/ArticleService.java
index b397e94c..abe3a5a4 100644
--- a/framework/src/main/java/cn/lili/modules/page/service/ArticleService.java
+++ b/framework/src/main/java/cn/lili/modules/page/service/ArticleService.java
@@ -69,4 +69,12 @@ public interface ArticleService extends IService {
*/
@Cacheable(key = "#type")
Article customGetByType(String type);
+
+ /**
+ * 修改文章状态
+ * @param id 文章ID
+ * @param status 显示状态
+ */
+ @CacheEvict(key = "#id")
+ Boolean updateArticleStatus(String id,boolean status);
}
\ No newline at end of file
diff --git a/framework/src/main/java/cn/lili/modules/page/serviceimpl/ArticleServiceImpl.java b/framework/src/main/java/cn/lili/modules/page/serviceimpl/ArticleServiceImpl.java
index 0a1f9f71..421f8cef 100644
--- a/framework/src/main/java/cn/lili/modules/page/serviceimpl/ArticleServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/page/serviceimpl/ArticleServiceImpl.java
@@ -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 implements ArticleService {
- @Autowired
- private ArticleMapper articleMapper;
-
@Override
public IPage articlePage(ArticleSearchParams articleSearchParams) {
articleSearchParams.setSort("a.sort");
@@ -82,4 +79,11 @@ public class ArticleServiceImpl extends ServiceImpl 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);
+ }
}
\ No newline at end of file
diff --git a/framework/src/main/java/cn/lili/modules/page/serviceimpl/PageDataServiceImpl.java b/framework/src/main/java/cn/lili/modules/page/serviceimpl/PageDataServiceImpl.java
index afe8386b..92165a49 100644
--- a/framework/src/main/java/cn/lili/modules/page/serviceimpl/PageDataServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/page/serviceimpl/PageDataServiceImpl.java
@@ -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 implements PageDataService {
- @Autowired
- private PageDataMapper pageDataMapper;
@Override
public void addStorePageData(String storeId) {
@@ -116,7 +112,7 @@ public class PageDataServiceImpl extends ServiceImpl 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 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 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);
}
}
\ No newline at end of file
diff --git a/framework/src/main/java/cn/lili/modules/page/serviceimpl/SpecialServiceImpl.java b/framework/src/main/java/cn/lili/modules/page/serviceimpl/SpecialServiceImpl.java
index 85a19ed7..09b6a4f8 100644
--- a/framework/src/main/java/cn/lili/modules/page/serviceimpl/SpecialServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/page/serviceimpl/SpecialServiceImpl.java
@@ -18,9 +18,6 @@ import org.springframework.stereotype.Service;
@Service
public class SpecialServiceImpl extends ServiceImpl implements SpecialService {
- //专题
- @Autowired
- private SpecialMapper specialMapper;
//页面数据
@Autowired
private PageDataService pageDataService;
diff --git a/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java b/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java
index 446146f0..6399897e 100644
--- a/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java
+++ b/manager-api/src/main/java/cn/lili/controller/other/ArticleManagerController.java
@@ -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> 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 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 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}")