Commit 5285653b by 吴迪

修改bug 05.16-05.18

parent d0037d5e
...@@ -60,6 +60,7 @@ public class BikecodeController { ...@@ -60,6 +60,7 @@ public class BikecodeController {
@RequestMapping("/save") @RequestMapping("/save")
// @RequiresPermissions("manage:bikecode:save") // @RequiresPermissions("manage:bikecode:save")
public R save(@RequestBody BikecodeEntity bikecode){ public R save(@RequestBody BikecodeEntity bikecode){
bikecodeService.save(bikecode); bikecodeService.save(bikecode);
return R.ok(); return R.ok();
......
...@@ -93,6 +93,7 @@ public class CasesController extends AbstractController { ...@@ -93,6 +93,7 @@ public class CasesController extends AbstractController {
cases.setLasteditor(getUser().getUsername()); cases.setLasteditor(getUser().getUsername());
cases.setRegisterdate(new Date()); cases.setRegisterdate(new Date());
cases.setUpdatedate(new Date()); cases.setUpdatedate(new Date());
cases.setStatus(0);
casesService.save(cases); casesService.save(cases);
return R.ok("新增成功!"); return R.ok("新增成功!");
} }
...@@ -171,6 +172,8 @@ public class CasesController extends AbstractController { ...@@ -171,6 +172,8 @@ public class CasesController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (casesEntity.getStatus() != 1) { if (casesEntity.getStatus() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
......
...@@ -70,6 +70,7 @@ public class DocController extends AbstractController { ...@@ -70,6 +70,7 @@ public class DocController extends AbstractController {
@RequestMapping("/save") @RequestMapping("/save")
@RequiresPermissions("manage:doc:save") @RequiresPermissions("manage:doc:save")
public R save(@RequestBody DocEntity doc){ public R save(@RequestBody DocEntity doc){
doc.setStatus(0);
docService.save(doc); docService.save(doc);
return R.ok(); return R.ok();
} }
......
...@@ -93,6 +93,8 @@ public class IndexCarouselManageController extends AbstractController { ...@@ -93,6 +93,8 @@ public class IndexCarouselManageController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (indexCarouselManage.getCheckflagIndex() != 1) { if (indexCarouselManage.getCheckflagIndex() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
......
...@@ -76,6 +76,7 @@ public class KnowledgeinfoController extends AbstractController { ...@@ -76,6 +76,7 @@ public class KnowledgeinfoController extends AbstractController {
public R save(@RequestBody KnowledgeinfoEntity knowledgeinfo){ public R save(@RequestBody KnowledgeinfoEntity knowledgeinfo){
knowledgeinfo.setInputdate(new Date()); knowledgeinfo.setInputdate(new Date());
knowledgeinfo.setEditor(getUser().getUsername()); knowledgeinfo.setEditor(getUser().getUsername());
knowledgeinfo.setStatus(0);
knowledgeinfoService.save(knowledgeinfo); knowledgeinfoService.save(knowledgeinfo);
return R.ok("新增成功!"); return R.ok("新增成功!");
} }
......
...@@ -69,6 +69,7 @@ public class LogisticsController extends AbstractController { ...@@ -69,6 +69,7 @@ public class LogisticsController extends AbstractController {
String username = getUser().getUsername(); String username = getUser().getUsername();
logistics.setEditor(username); logistics.setEditor(username);
logistics.setLasteditor(username); logistics.setLasteditor(username);
logistics.setStatus("0");
logisticsService.save(logistics); logisticsService.save(logistics);
return R.ok("新增成功!"); return R.ok("新增成功!");
} }
......
...@@ -72,6 +72,7 @@ public class MedicalController extends AbstractController { ...@@ -72,6 +72,7 @@ public class MedicalController extends AbstractController {
medical.setInputDate(new Date()); medical.setInputDate(new Date());
medical.setEditor(username); medical.setEditor(username);
medical.setLasteditor(username); medical.setLasteditor(username);
medical.setStatus("0");
if(medical.getReleasetime()==null) { if(medical.getReleasetime()==null) {
medical.setReleasetime(new Date()); medical.setReleasetime(new Date());
} }
...@@ -181,7 +182,7 @@ public class MedicalController extends AbstractController { ...@@ -181,7 +182,7 @@ public class MedicalController extends AbstractController {
@Value("${token.count}") @Value("${token.count}")
private int tokenCountConfig; private int tokenCountConfig;
@PostMapping("/api/getDetailById") @PostMapping({"/api/getDetailById"})
public R getDetailById(@RequestBody MedicalEntity medical) { public R getDetailById(@RequestBody MedicalEntity medical) {
MedicalEntity medicalEntity = medicalService.getById(medical.getId()); MedicalEntity medicalEntity = medicalService.getById(medical.getId());
if (medicalEntity == null) { if (medicalEntity == null) {
...@@ -198,6 +199,8 @@ public class MedicalController extends AbstractController { ...@@ -198,6 +199,8 @@ public class MedicalController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (medicalEntity.getStatus()!=null && !medicalEntity.getStatus().equals("1")) { if (medicalEntity.getStatus()!=null && !medicalEntity.getStatus().equals("1")) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
......
...@@ -5,7 +5,9 @@ import java.util.List; ...@@ -5,7 +5,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.annotation.SysLog; import io.office.common.annotation.SysLog;
...@@ -220,10 +222,19 @@ public class NewsController extends AbstractController { ...@@ -220,10 +222,19 @@ public class NewsController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (news.getStatus() != 1) { if (news.getStatus() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
} }
//点击量+1
NewsEntity newsUpdate = new NewsEntity();
newsUpdate.setHits(news.getHits()+1);
UpdateWrapper<NewsEntity> updateWrapper = new UpdateWrapper();
updateWrapper.eq("id",id);
newsService.update(newsUpdate,updateWrapper);
} }
return R.ok().put("data", news); return R.ok().put("data", news);
} }
...@@ -386,6 +397,8 @@ public class NewsController extends AbstractController { ...@@ -386,6 +397,8 @@ public class NewsController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (announceEntity.getStatus() != 1) { if (announceEntity.getStatus() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
...@@ -501,6 +514,8 @@ public class NewsController extends AbstractController { ...@@ -501,6 +514,8 @@ public class NewsController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (retMap.getStatus() != 1) { if (retMap.getStatus() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
...@@ -604,7 +619,7 @@ public class NewsController extends AbstractController { ...@@ -604,7 +619,7 @@ public class NewsController extends AbstractController {
* 专题推荐 * 专题推荐
*/ */
@Login @Login
@GetMapping({"/api/newsTopicInfo/{id}", ",/api/newsTopicInfo/{id}/{token}"}) @GetMapping({"/api/newsTopicInfo/{id}", "/api/newsTopicInfo/{id}/{token}"})
public R newsTopicInfo(@PathVariable("id") String id, @PathVariable(value = "token", required = false) String token) { public R newsTopicInfo(@PathVariable("id") String id, @PathVariable(value = "token", required = false) String token) {
NewtopicEntity newtopic = newtopicService.getById(id); NewtopicEntity newtopic = newtopicService.getById(id);
if (newtopic == null) { if (newtopic == null) {
...@@ -621,6 +636,8 @@ public class NewsController extends AbstractController { ...@@ -621,6 +636,8 @@ public class NewsController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (newtopic.getCheckflag() != 1) { if (newtopic.getCheckflag() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
...@@ -779,6 +796,8 @@ public class NewsController extends AbstractController { ...@@ -779,6 +796,8 @@ public class NewsController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (newsMovie.getStatus() != 1) { if (newsMovie.getStatus() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
......
...@@ -168,6 +168,8 @@ public class PartnersController extends AbstractController { ...@@ -168,6 +168,8 @@ public class PartnersController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (partners.getStatus() != 1) { if (partners.getStatus() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
......
...@@ -211,6 +211,8 @@ public class PictureController extends AbstractController { ...@@ -211,6 +211,8 @@ public class PictureController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (picture.getStatus() != 1) { if (picture.getStatus() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
......
...@@ -4,11 +4,13 @@ import java.util.List; ...@@ -4,11 +4,13 @@ import java.util.List;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.annotation.SysLog; import io.office.common.annotation.SysLog;
import io.office.common.utils.PageUtils; import io.office.common.utils.PageUtils;
import io.office.common.utils.R; import io.office.common.utils.R;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.PictureEntity; import io.office.modules.manage.entity.PictureEntity;
import io.office.modules.manage.entity.PolicyEntity; import io.office.modules.manage.entity.PolicyEntity;
import io.office.modules.manage.entity.TokenCount; import io.office.modules.manage.entity.TokenCount;
...@@ -207,10 +209,18 @@ public class PolicyController extends AbstractController { ...@@ -207,10 +209,18 @@ public class PolicyController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else{ } else{
if(StrUtil.equals("0",policy.getStatus())) { if(StrUtil.equals("0",policy.getStatus())) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
} }
//点击量+1
PolicyEntity policyUpdate = new PolicyEntity();
policyUpdate.setHits(policy.getHits()+1);
UpdateWrapper<PolicyEntity> updateWrapper = new UpdateWrapper();
updateWrapper.eq("id",id);
policyService.update(policyUpdate,updateWrapper);
} }
......
...@@ -142,9 +142,9 @@ public class ProductController extends AbstractController { ...@@ -142,9 +142,9 @@ public class ProductController extends AbstractController {
public R findPage(@RequestBody Map<String,String> param){ public R findPage(@RequestBody Map<String,String> param){
Page<ProductEntity> pag = this.productService.findPage( Page<ProductEntity> pag = this.productService.findPage(
new Page(Integer.valueOf(param.get("page")), new Page(Integer.valueOf(param.get("page")),
Integer.valueOf(param.get("size"))),param.get("id")); Integer.valueOf(param.get("size"))),param.get("id"),param.get("token"));
PageUtils pageUtils = new PageUtils(pag); PageUtils pageUtils = new PageUtils(pag);
if (pageUtils.getTotalCount() != 0) { if (pageUtils.getTotalCount() == 0) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
} }
if (param.get("token") != null && StringUtils.isNotBlank(param.get("token").toString())) { if (param.get("token") != null && StringUtils.isNotBlank(param.get("token").toString())) {
...@@ -158,10 +158,16 @@ public class ProductController extends AbstractController { ...@@ -158,10 +158,16 @@ public class ProductController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
ProductEntity productEntity = (ProductEntity) pageUtils.getList().get(0); if (pageUtils.getTotalCount() == 0) {
if (productEntity.getStatus() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
}else if(pageUtils.getTotalCount() == 1){
ProductEntity productEntity = (ProductEntity) pageUtils.getList().get(0);
if (productEntity.getStatus() != 1) {
return R.error("没有可显示的内容");
}
} }
} }
return R.ok().put("page", pageUtils); return R.ok().put("page", pageUtils);
......
...@@ -60,6 +60,7 @@ public class RetailController { ...@@ -60,6 +60,7 @@ public class RetailController {
@RequestMapping("/save") @RequestMapping("/save")
// @RequiresPermissions("manage:retail:save") // @RequiresPermissions("manage:retail:save")
public R save(@RequestBody RetailEntity retail) { public R save(@RequestBody RetailEntity retail) {
retail.setStatus(0);
retailService.save(retail); retailService.save(retail);
return R.ok(); return R.ok();
......
...@@ -157,6 +157,8 @@ public class RetailpictureController extends AbstractController { ...@@ -157,6 +157,8 @@ public class RetailpictureController extends AbstractController {
//删除无用token //删除无用token
return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!"); return R.error("预览链接次数已达上限,请联系相关人员重新获取预览链接!");
} }
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else { } else {
if (picture.getStatus() != 1) { if (picture.getStatus() != 1) {
return R.error("没有可显示的内容"); return R.error("没有可显示的内容");
......
...@@ -41,6 +41,11 @@ public class TokenController extends AbstractController { ...@@ -41,6 +41,11 @@ public class TokenController extends AbstractController {
tokenCount.setCreateTime(DateUtils.getCurrentTime(DateUtils.FORMAT1)); tokenCount.setCreateTime(DateUtils.getCurrentTime(DateUtils.FORMAT1));
tokenCount.setId(Long.parseLong(IdWorkerUtils.getSEQByKey(IdKeysConstant.ID_SEQ_KEY))); tokenCount.setId(Long.parseLong(IdWorkerUtils.getSEQByKey(IdKeysConstant.ID_SEQ_KEY)));
tokenCount.setCountFlag(0); tokenCount.setCountFlag(0);
tokenCountService.save(tokenCount);
return R.ok().put("data", token); return R.ok().put("data", token);
} }
public static void main(String[] args) {
System.out.println(IdWorkerUtils.getSEQByKey(IdKeysConstant.ID_SEQ_KEY));
}
} }
...@@ -19,5 +19,5 @@ import java.util.Map; ...@@ -19,5 +19,5 @@ import java.util.Map;
public interface ProductDao extends BaseMapper<ProductEntity> { public interface ProductDao extends BaseMapper<ProductEntity> {
List<ProductEntity> selectProductList(@Param("params") Map<String, Object> params, Page page); List<ProductEntity> selectProductList(@Param("params") Map<String, Object> params, Page page);
List<ProductEntity> findPage(Page page,@Param("id") Object id); List<ProductEntity> findPage(Page page,@Param("id") Object id,@Param("token") String token);
} }
package io.office.modules.manage.entity; package io.office.modules.manage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
...@@ -16,6 +18,7 @@ import java.io.Serializable; ...@@ -16,6 +18,7 @@ import java.io.Serializable;
public class TokenCount implements Serializable { public class TokenCount implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(type = IdType.INPUT)
private long id; private long id;
private String token; private String token;
......
...@@ -28,6 +28,6 @@ public interface ProductService extends IService<ProductEntity> { ...@@ -28,6 +28,6 @@ public interface ProductService extends IService<ProductEntity> {
Page<ProductEntity> selectProductList(Map<String, Object> params, Page page); Page<ProductEntity> selectProductList(Map<String, Object> params, Page page);
Page<ProductEntity> findPage(Page page,Object id); Page<ProductEntity> findPage(Page page,Object id,String token);
} }
...@@ -47,6 +47,7 @@ public class IndexCarouselManageServiceImpl extends ServiceImpl<IndexCarouselMan ...@@ -47,6 +47,7 @@ public class IndexCarouselManageServiceImpl extends ServiceImpl<IndexCarouselMan
indexCarouselManage.setCheckIndexAuthor(user.getUsername()); indexCarouselManage.setCheckIndexAuthor(user.getUsername());
indexCarouselManage.setBriefShow(indexCarouselManage.getBrief()); indexCarouselManage.setBriefShow(indexCarouselManage.getBrief());
indexCarouselManage.setLevelsIndex(indexCarouselManage.getLevels()-1); indexCarouselManage.setLevelsIndex(indexCarouselManage.getLevels()-1);
indexCarouselManage.setCheckflagIndex(0);
int insert = baseMapper.insert(indexCarouselManage); int insert = baseMapper.insert(indexCarouselManage);
if (insert>0){ if (insert>0){
return R.ok("新增成功!"); return R.ok("新增成功!");
......
...@@ -67,6 +67,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt ...@@ -67,6 +67,7 @@ public class NewsMovieServiceImpl extends ServiceImpl<NewsMovieDao, NewsMovieEnt
newtopicEntityVo.setLittlepic(newtopicEntityVo.getPic()); newtopicEntityVo.setLittlepic(newtopicEntityVo.getPic());
newtopicEntityVo.setBigpic(newtopicEntityVo.getPic()); newtopicEntityVo.setBigpic(newtopicEntityVo.getPic());
} }
newtopicEntityVo.setStatus(0);
NewsMovieEntity newsMovieEntity = new NewsMovieEntity(); NewsMovieEntity newsMovieEntity = new NewsMovieEntity();
BeanUtils.copyProperties(newtopicEntityVo,newsMovieEntity); BeanUtils.copyProperties(newtopicEntityVo,newsMovieEntity);
baseMapper.insert(newsMovieEntity); baseMapper.insert(newsMovieEntity);
......
...@@ -50,6 +50,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements ...@@ -50,6 +50,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
news.setLasteditor(user.getUsername()); news.setLasteditor(user.getUsername());
news.setStartdate(new Date()); news.setStartdate(new Date());
news.setPublicdate(new Date()); news.setPublicdate(new Date());
news.setStatus(0);
//二级栏目不为空时 classid取值二级栏目id值 //二级栏目不为空时 classid取值二级栏目id值
if (news.getCclassid() != null&&StringUtils.isNotBlank(news.getCclassid().toString())) { if (news.getCclassid() != null&&StringUtils.isNotBlank(news.getCclassid().toString())) {
news.setClassid(news.getCclassid()); news.setClassid(news.getCclassid());
......
...@@ -38,6 +38,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i ...@@ -38,6 +38,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i
@Override @Override
public R insertProduct(ProductEntity product, SysUserEntity user) { public R insertProduct(ProductEntity product, SysUserEntity user) {
product.setAdddate(new Date()); product.setAdddate(new Date());
product.setStatus(0);
int insert = baseMapper.insert(product); int insert = baseMapper.insert(product);
if (insert>0){ if (insert>0){
return R.ok("新增成功!"); return R.ok("新增成功!");
...@@ -81,8 +82,8 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i ...@@ -81,8 +82,8 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i
} }
@Override @Override
public Page<ProductEntity> findPage(Page page,Object id) { public Page<ProductEntity> findPage(Page page,Object id,String token) {
List<ProductEntity> list =this.productDao.findPage(page,id); List<ProductEntity> list =this.productDao.findPage(page,id,token);
page.setRecords(list); page.setRecords(list);
return page; return page;
} }
......
...@@ -54,6 +54,7 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt ...@@ -54,6 +54,7 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt
TopicnewsEntity topicnewsEntity = new TopicnewsEntity(); TopicnewsEntity topicnewsEntity = new TopicnewsEntity();
topicnewsEntity.setClassid(news.getClassid()); topicnewsEntity.setClassid(news.getClassid());
news.setClassid(35); news.setClassid(35);
news.setStatus(0);
newsService.insertNews(news,user); newsService.insertNews(news,user);
topicnewsEntity.setNewsid(news.getId()); topicnewsEntity.setNewsid(news.getId());
topicnewsEntity.setNewslevels(news.getLevels()); topicnewsEntity.setNewslevels(news.getLevels());
......
...@@ -69,6 +69,10 @@ ...@@ -69,6 +69,10 @@
<if test="id!=null and id !=''"> <if test="id!=null and id !=''">
and id =#{id} and id =#{id}
</if> </if>
<if test="token==null ||token==''">
and status > 0
</if>
ORDER BY levels DESC, adddate DESC ORDER BY levels DESC, adddate DESC
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment