Commit d282bc00 by 吴迪

【新增】

parent 9485e338
......@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.app.annotation.Login;
......@@ -543,4 +544,60 @@ public class NewsController extends AbstractController {
}
@Login
@PostMapping("/api/retailTop7Info")
// @RequiresPermissions("manage:news:list")
public R RetailTop7Info() {
QueryWrapper<NewsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.select("top 7 * ");
queryWrapper.gt("levels","0");
queryWrapper.eq("status","1");
//.or().like("content","零售").or().like("content","商品二维码").or().like("content","全渠道")
queryWrapper.eq("classid","14").or().like("keyword","零售").or().like("keyword","全渠道").like("keyword","商品二维码");
queryWrapper.orderByDesc("levels ","id");
List<NewsEntity> lists = newsService.list(queryWrapper);
/*Page<NewsEntity> page = this.newsService.selectRealTimeInfo(newsParams,
new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page);*/
return R.ok().put("data", lists);
}
@Login
@PostMapping("/api/retailList")
// @RequiresPermissions("manage:news:list")
public R retailList(@RequestBody Map<String, String> params) {
QueryWrapper<NewsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.gt("levels","0");
queryWrapper.eq("status","1");
//or().like("content","零售").or().like("content","商品二维码").or().like("content","全渠道").
queryWrapper.eq("classid","14").or().like("keyword","零售").or().like("keyword","全渠道").like("keyword","商品二维码");
queryWrapper.orderByDesc("levels ","id");
Page page = newsService.page(new Page(Integer.valueOf(params.get("page")),
Integer.valueOf(params.get("size"))), queryWrapper);
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("data", pageUtils);
}
//首页商品二维码在零售领域的应用
@Login
@PostMapping("/api/retailCodeList")
// @RequiresPermissions("manage:news:list")
public R retailCodeTop6List(@RequestBody Map<String, String> params) {
QueryWrapper<NewsEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.gt("levels","0");
queryWrapper.eq("status","1");
//or().like("content","零售").or().like("content","商品二维码").or().like("content","全渠道").
queryWrapper.eq("classid","14").or().like("keyword","商品二维码");
queryWrapper.orderByDesc("levels ","id");
Page page = newsService.page(new Page(Integer.valueOf(params.get("page")),
Integer.valueOf(params.get("size"))), queryWrapper);
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("data", pageUtils);
}
}
......@@ -18,7 +18,6 @@ import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
/**
* ${comments}
*
......@@ -37,7 +36,7 @@ public class RetailController {
*/
@RequestMapping("/list")
// @RequiresPermissions("manage:retail:list")
public R list(@RequestParam Map<String, Object> params){
public R list(@RequestParam Map<String, Object> params) {
PageUtils page = retailService.queryPage(params);
return R.ok().put("page", page);
......@@ -49,7 +48,7 @@ public class RetailController {
*/
@RequestMapping("/info/{id}")
// @RequiresPermissions("manage:retail:info")
public R info(@PathVariable("id") Integer id){
public R info(@PathVariable("id") Integer id) {
RetailEntity retail = retailService.getById(id);
return R.ok().put("retail", retail);
......@@ -60,7 +59,7 @@ public class RetailController {
*/
@RequestMapping("/save")
// @RequiresPermissions("manage:retail:save")
public R save(@RequestBody RetailEntity retail){
public R save(@RequestBody RetailEntity retail) {
retailService.save(retail);
return R.ok();
......@@ -71,7 +70,7 @@ public class RetailController {
*/
@RequestMapping("/update")
// @RequiresPermissions("manage:retail:update")
public R update(@RequestBody RetailEntity retail){
public R update(@RequestBody RetailEntity retail) {
retailService.updateById(retail);
return R.ok();
......@@ -82,7 +81,7 @@ public class RetailController {
*/
@RequestMapping("/delete")
// @RequiresPermissions("manage:retail:delete")
public R delete(@RequestBody Integer[] ids){
public R delete(@RequestBody Integer[] ids) {
retailService.removeByIds(Arrays.asList(ids));
return R.ok();
......@@ -91,18 +90,16 @@ public class RetailController {
/**
* 应用指南列表
* @param retailEntityVo
*
* @param params
* @return
*/
/* @Login
@Login
@PostMapping("/api/guideList")
public R guideList(@RequestBody RetailEntityVo retailEntityVo) {
*//* Page<RetailEntity> page = this.retailService.queryPage(retailEntityVo,
new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("data", pageUtils);*//*
}*/
public R guideList(@RequestParam Map<String, Object> params) {
PageUtils page = retailService.queryPageList(params);
return R.ok().put("data", page);
}
}
......@@ -40,7 +40,7 @@ public class RetailServiceImpl extends ServiceImpl<RetailDao, RetailEntity> impl
new Query<RetailEntity>().getPage(params),
retailEntityQueryWrapper
);
return null;
return new PageUtils(page);
}
}
\ No newline at end of file
......@@ -199,7 +199,7 @@
<!-- 4 最终的策略:
基本策略(root级) + 根据profile在启动时, logger标签中定制化package日志级别(优先级高于上面的root级)-->
<springProfile name="dev">
<root level="info">
<root level="debug">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" />
......@@ -211,7 +211,7 @@
</springProfile>
<springProfile name="test">
<root level="info">
<root level="debug">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" />
......
......@@ -52,7 +52,7 @@
<select id="getBikeFirm" parameterType="io.office.modules.manage.vo.request.BikeFirmVo" resultType="io.office.modules.manage.vo.request.BikeFirmVo">
select a.firm_name,b.code,'注册' as status from ancc_db2.dbo.bikefirm a left join ancc_db2.dbo.bikecode b on a.id=b.bikeid where check_stat=1
select a.firm_name,b.code,'注册' as status from ancc.dbo.bikefirm a left join ancc.dbo.bikecode b on a.id=b.bikeid where check_stat=1
<if test="code!='' and code!=null">
and b.code= #{code}
</if>
......
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