Commit d282bc00 by 吴迪

【新增】

parent 9485e338
...@@ -5,6 +5,7 @@ import java.util.List; ...@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
...@@ -543,4 +544,60 @@ public class NewsController extends AbstractController { ...@@ -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,12 +18,11 @@ import io.office.common.utils.PageUtils; ...@@ -18,12 +18,11 @@ import io.office.common.utils.PageUtils;
import io.office.common.utils.R; import io.office.common.utils.R;
/** /**
* ${comments} * ${comments}
* *
* @author wudi * @author wudi
* @email * @email
* @date 2021-12-21 22:43:34 * @date 2021-12-21 22:43:34
*/ */
@RestController @RestController
...@@ -36,8 +35,8 @@ public class RetailController { ...@@ -36,8 +35,8 @@ public class RetailController {
* 列表 * 列表
*/ */
@RequestMapping("/list") @RequestMapping("/list")
// @RequiresPermissions("manage:retail: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); PageUtils page = retailService.queryPage(params);
return R.ok().put("page", page); return R.ok().put("page", page);
...@@ -48,9 +47,9 @@ public class RetailController { ...@@ -48,9 +47,9 @@ public class RetailController {
* 信息 * 信息
*/ */
@RequestMapping("/info/{id}") @RequestMapping("/info/{id}")
// @RequiresPermissions("manage:retail:info") // @RequiresPermissions("manage:retail:info")
public R info(@PathVariable("id") Integer id){ public R info(@PathVariable("id") Integer id) {
RetailEntity retail = retailService.getById(id); RetailEntity retail = retailService.getById(id);
return R.ok().put("retail", retail); return R.ok().put("retail", retail);
} }
...@@ -59,9 +58,9 @@ public class RetailController { ...@@ -59,9 +58,9 @@ 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) {
retailService.save(retail); retailService.save(retail);
return R.ok(); return R.ok();
} }
...@@ -70,9 +69,9 @@ public class RetailController { ...@@ -70,9 +69,9 @@ public class RetailController {
* 修改 * 修改
*/ */
@RequestMapping("/update") @RequestMapping("/update")
// @RequiresPermissions("manage:retail:update") // @RequiresPermissions("manage:retail:update")
public R update(@RequestBody RetailEntity retail){ public R update(@RequestBody RetailEntity retail) {
retailService.updateById(retail); retailService.updateById(retail);
return R.ok(); return R.ok();
} }
...@@ -81,9 +80,9 @@ public class RetailController { ...@@ -81,9 +80,9 @@ public class RetailController {
* 删除 * 删除
*/ */
@RequestMapping("/delete") @RequestMapping("/delete")
// @RequiresPermissions("manage:retail:delete") // @RequiresPermissions("manage:retail:delete")
public R delete(@RequestBody Integer[] ids){ public R delete(@RequestBody Integer[] ids) {
retailService.removeByIds(Arrays.asList(ids)); retailService.removeByIds(Arrays.asList(ids));
return R.ok(); return R.ok();
} }
...@@ -91,18 +90,16 @@ public class RetailController { ...@@ -91,18 +90,16 @@ public class RetailController {
/** /**
* 应用指南列表 * 应用指南列表
* @param retailEntityVo *
* @param params
* @return * @return
*/ */
/* @Login @Login
@PostMapping("/api/guideList") @PostMapping("/api/guideList")
public R guideList(@RequestBody RetailEntityVo retailEntityVo) { public R guideList(@RequestParam Map<String, Object> params) {
*//* Page<RetailEntity> page = this.retailService.queryPage(retailEntityVo, PageUtils page = retailService.queryPageList(params);
new Page(newsParams.getPage(), newsParams.getLimit())); return R.ok().put("data", page);
PageUtils pageUtils = new PageUtils(page); }
return R.ok().put("data", pageUtils);*//*
}*/
} }
...@@ -40,7 +40,7 @@ public class RetailServiceImpl extends ServiceImpl<RetailDao, RetailEntity> impl ...@@ -40,7 +40,7 @@ public class RetailServiceImpl extends ServiceImpl<RetailDao, RetailEntity> impl
new Query<RetailEntity>().getPage(params), new Query<RetailEntity>().getPage(params),
retailEntityQueryWrapper retailEntityQueryWrapper
); );
return null; return new PageUtils(page);
} }
} }
\ No newline at end of file
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
<!-- 4 最终的策略: <!-- 4 最终的策略:
基本策略(root级) + 根据profile在启动时, logger标签中定制化package日志级别(优先级高于上面的root级)--> 基本策略(root级) + 根据profile在启动时, logger标签中定制化package日志级别(优先级高于上面的root级)-->
<springProfile name="dev"> <springProfile name="dev">
<root level="info"> <root level="debug">
<appender-ref ref="CONSOLE" /> <appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" /> <appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" /> <appender-ref ref="INFO_FILE" />
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
</springProfile> </springProfile>
<springProfile name="test"> <springProfile name="test">
<root level="info"> <root level="debug">
<appender-ref ref="CONSOLE" /> <appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" /> <appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" /> <appender-ref ref="INFO_FILE" />
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<select id="getBikeFirm" parameterType="io.office.modules.manage.vo.request.BikeFirmVo" resultType="io.office.modules.manage.vo.request.BikeFirmVo"> <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"> <if test="code!='' and code!=null">
and b.code= #{code} and b.code= #{code}
</if> </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