Commit e74da019 by 吴迪

修改项目请求方式

parent 046bb944
...@@ -40,7 +40,7 @@ public class AppLoginController { ...@@ -40,7 +40,7 @@ public class AppLoginController {
/** /**
* 登录 * 登录
*/ */
@PostMapping("login") @RequestMapping("login")
public R login(@RequestBody LoginForm form) { public R login(@RequestBody LoginForm form) {
//表单校验 //表单校验
ValidatorUtils.validateEntity(form); ValidatorUtils.validateEntity(form);
......
...@@ -31,7 +31,7 @@ public class AppRegisterController { ...@@ -31,7 +31,7 @@ public class AppRegisterController {
@Autowired @Autowired
private UserService userService; private UserService userService;
@PostMapping("register") @RequestMapping("register")
public R register(@RequestBody RegisterForm form) { public R register(@RequestBody RegisterForm form) {
//表单校验 //表单校验
......
...@@ -125,7 +125,7 @@ public class AnnounceController extends AbstractController { ...@@ -125,7 +125,7 @@ public class AnnounceController extends AbstractController {
* 审核 * 审核
*/ */
@SysLog("审核公告[announce]") @SysLog("审核公告[announce]")
@PostMapping("/verify") @RequestMapping("/verify")
@Transactional @Transactional
@RequiresPermissions("manage:announce:check") @RequiresPermissions("manage:announce:check")
public R verify(@RequestBody AnnounceEntity announce) { public R verify(@RequestBody AnnounceEntity announce) {
......
...@@ -36,7 +36,7 @@ public class BarcodeGenerationController { ...@@ -36,7 +36,7 @@ public class BarcodeGenerationController {
* @return pictureUrl 获取条形码地址 * @return pictureUrl 获取条形码地址
*/ */
@Login @Login
@PostMapping("/api/createQRcode") @RequestMapping("/api/createQRcode")
public R createQRcode(@RequestBody CreateQRcodeVo createQRcodeVo) { public R createQRcode(@RequestBody CreateQRcodeVo createQRcodeVo) {
if (createQRcodeVo.getParam().size() == 0) { if (createQRcodeVo.getParam().size() == 0) {
return R.error("参数有误"); return R.error("参数有误");
...@@ -46,7 +46,7 @@ public class BarcodeGenerationController { ...@@ -46,7 +46,7 @@ public class BarcodeGenerationController {
} }
@Login @Login
@PostMapping("/api/getGS1CodeListSSCC") @RequestMapping("/api/getGS1CodeListSSCC")
public R getGS1CodeListSSCC() { public R getGS1CodeListSSCC() {
List<GS1CodeListEntity> ais = barcodeGenerationService.getGS1CodeListSSCC(); List<GS1CodeListEntity> ais = barcodeGenerationService.getGS1CodeListSSCC();
return R.ok().put("data", ais); return R.ok().put("data", ais);
...@@ -54,7 +54,7 @@ public class BarcodeGenerationController { ...@@ -54,7 +54,7 @@ public class BarcodeGenerationController {
@Login @Login
@PostMapping("/api/getGS1CodeListGRAI") @RequestMapping("/api/getGS1CodeListGRAI")
public R getGS1CodeListGRAI() { public R getGS1CodeListGRAI() {
GS1CodeListEntity ai = barcodeGenerationService.getGS1CodeListGRAI(); GS1CodeListEntity ai = barcodeGenerationService.getGS1CodeListGRAI();
return R.ok().put("data", ai); return R.ok().put("data", ai);
...@@ -62,7 +62,7 @@ public class BarcodeGenerationController { ...@@ -62,7 +62,7 @@ public class BarcodeGenerationController {
@Login @Login
@PostMapping("/api/checkGS1Code") @RequestMapping("/api/checkGS1Code")
public R checkGS1Code(@Valid @RequestBody CheckAIVo body) { public R checkGS1Code(@Valid @RequestBody CheckAIVo body) {
String result = CheckAICodeUtil.ckeckCode(body.getCode(), body.getContent()); String result = CheckAICodeUtil.ckeckCode(body.getCode(), body.getContent());
return R.ok().put("data", result); return R.ok().put("data", result);
......
...@@ -106,7 +106,7 @@ public class BikefirmController { ...@@ -106,7 +106,7 @@ public class BikefirmController {
@Login @Login
@PostMapping("/api/getBikeFirm") @RequestMapping("/api/getBikeFirm")
public R getBikeFirm(@RequestBody BikeFirmVo bikeFirmVo, HttpServletRequest request) { public R getBikeFirm(@RequestBody BikeFirmVo bikeFirmVo, HttpServletRequest request) {
......
...@@ -143,7 +143,7 @@ public class CasesController extends AbstractController { ...@@ -143,7 +143,7 @@ public class CasesController extends AbstractController {
*/ */
@SysLog("审核案例[cases]") @SysLog("审核案例[cases]")
@Transactional @Transactional
@PostMapping("/verify") @RequestMapping("/verify")
@RequiresPermissions("standard:cases:verify") @RequiresPermissions("standard:cases:verify")
public R verify(@RequestBody CasesEntity casesEntity){ public R verify(@RequestBody CasesEntity casesEntity){
try { try {
......
...@@ -127,7 +127,7 @@ public class CenterController extends AbstractController { ...@@ -127,7 +127,7 @@ public class CenterController extends AbstractController {
*/ */
@SysLog("审核中央总局和精神[center]") @SysLog("审核中央总局和精神[center]")
@Transactional @Transactional
@PostMapping("/verifyTopic") @RequestMapping("/verifyTopic")
@RequiresPermissions("manage:center:check") @RequiresPermissions("manage:center:check")
public R verify(@RequestBody NewsEntity news) { public R verify(@RequestBody NewsEntity news) {
try { try {
......
...@@ -112,7 +112,7 @@ public class DocController extends AbstractController { ...@@ -112,7 +112,7 @@ public class DocController extends AbstractController {
} }
@Login @Login
@PostMapping("/api/downLoad") @RequestMapping("/api/downLoad")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList") // @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R downLoad() { public R downLoad() {
try { try {
...@@ -131,7 +131,7 @@ public class DocController extends AbstractController { ...@@ -131,7 +131,7 @@ public class DocController extends AbstractController {
@Login @Login
@PostMapping("/api/list") @RequestMapping("/api/list")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList") // @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R listPage(@RequestBody Map<String, Object> params) { public R listPage(@RequestBody Map<String, Object> params) {
try { try {
......
...@@ -26,7 +26,7 @@ public class FileController { ...@@ -26,7 +26,7 @@ public class FileController {
private UploadUtils uploadUtils; private UploadUtils uploadUtils;
@Login @Login
@PostMapping("/uploadFile") @RequestMapping("/uploadFile")
public R uploadFile(@RequestParam("file") MultipartFile file) { public R uploadFile(@RequestParam("file") MultipartFile file) {
return R.ok().put("data",uploadUtils.fileUpload(file)); return R.ok().put("data",uploadUtils.fileUpload(file));
} }
......
...@@ -56,7 +56,7 @@ public class GLNController { ...@@ -56,7 +56,7 @@ public class GLNController {
@Login @Login
@PostMapping("/api/gln") @RequestMapping("/api/gln")
public R uploadFile(@RequestBody GLNRequestBo glnRequestBo, HttpServletRequest request) { public R uploadFile(@RequestBody GLNRequestBo glnRequestBo, HttpServletRequest request) {
String typeKey = ""; String typeKey = "";
boolean captcha = sysCaptchaService.validate(glnRequestBo.getUuid(), glnRequestBo.getCaptcha()); boolean captcha = sysCaptchaService.validate(glnRequestBo.getUuid(), glnRequestBo.getCaptcha());
...@@ -112,7 +112,7 @@ public class GLNController { ...@@ -112,7 +112,7 @@ public class GLNController {
* @return * @return
*/ */
@Login @Login
@PostMapping("/api/domesticCode") @RequestMapping("/api/domesticCode")
public R domesticCode(@RequestBody DomesticCodeVo domesticCodeVo, HttpServletRequest request) { public R domesticCode(@RequestBody DomesticCodeVo domesticCodeVo, HttpServletRequest request) {
if(StringUtils.isBlank(domesticCodeVo.getCode())) { if(StringUtils.isBlank(domesticCodeVo.getCode())) {
...@@ -212,7 +212,7 @@ public class GLNController { ...@@ -212,7 +212,7 @@ public class GLNController {
*/ */
@Login @Login
@PostMapping("/api/domesticCodeDetail") @RequestMapping("/api/domesticCodeDetail")
public R domesticCodeDetail(@RequestBody DomesticCodeDetailRequest domesticCodeDetailRequest, HttpServletRequest request) { public R domesticCodeDetail(@RequestBody DomesticCodeDetailRequest domesticCodeDetailRequest, HttpServletRequest request) {
return R.ok().put("data",firmService.getDetail(domesticCodeDetailRequest)); return R.ok().put("data",firmService.getDetail(domesticCodeDetailRequest));
...@@ -225,7 +225,7 @@ public class GLNController { ...@@ -225,7 +225,7 @@ public class GLNController {
* @return * @return
*/ */
@Login @Login
@PostMapping("/api/domesticCodeUpdateList") @RequestMapping("/api/domesticCodeUpdateList")
public R domesticCodeUpdateList(@RequestBody DomesticCodeDetailRequest domesticCodeDetailRequest, HttpServletRequest request) { public R domesticCodeUpdateList(@RequestBody DomesticCodeDetailRequest domesticCodeDetailRequest, HttpServletRequest request) {
return R.ok().put("data",firmService.domesticCodeUpdateList(domesticCodeDetailRequest.getCode())); return R.ok().put("data",firmService.domesticCodeUpdateList(domesticCodeDetailRequest.getCode()));
......
...@@ -47,7 +47,7 @@ public class GTINController { ...@@ -47,7 +47,7 @@ public class GTINController {
private SearchLimitUtil searchLimitUtil; private SearchLimitUtil searchLimitUtil;
@Login @Login
@PostMapping("/api/gtin") @RequestMapping("/api/gtin")
public void uploadFile(@RequestBody GLNRequestBo glnRequestBo, HttpServletRequest request, HttpServletResponse response) { public void uploadFile(@RequestBody GLNRequestBo glnRequestBo, HttpServletRequest request, HttpServletResponse response) {
PrintWriter printWriter = null; PrintWriter printWriter = null;
try { try {
...@@ -117,7 +117,7 @@ public class GTINController { ...@@ -117,7 +117,7 @@ public class GTINController {
} }
@Login @Login
@PostMapping("/api/domesticCodeProductionNews") @RequestMapping("/api/domesticCodeProductionNews")
public void domesticCodeProductionNews(@RequestBody GLNRequestBo glnRequestBo, HttpServletRequest request, HttpServletResponse response) { public void domesticCodeProductionNews(@RequestBody GLNRequestBo glnRequestBo, HttpServletRequest request, HttpServletResponse response) {
PrintWriter printWriter = null; PrintWriter printWriter = null;
try { try {
......
...@@ -119,7 +119,7 @@ public class GlossaryController extends AbstractController { ...@@ -119,7 +119,7 @@ public class GlossaryController extends AbstractController {
@Login @Login
@PostMapping("/api/terminology") @RequestMapping("/api/terminology")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList") // @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R terminology(@RequestBody TerminologyVo terminologyVo, HttpServletRequest request) { public R terminology(@RequestBody TerminologyVo terminologyVo, HttpServletRequest request) {
try { try {
......
...@@ -126,7 +126,7 @@ public class HotFollowController extends AbstractController { ...@@ -126,7 +126,7 @@ public class HotFollowController extends AbstractController {
*/ */
@SysLog("审核热点关注[hotFlow]") @SysLog("审核热点关注[hotFlow]")
@Transactional @Transactional
@PostMapping("/verifyTopic") @RequestMapping("/verifyTopic")
@RequiresPermissions("manage:hotFlow:check") @RequiresPermissions("manage:hotFlow:check")
public R verify(@RequestBody NewsEntity news) { public R verify(@RequestBody NewsEntity news) {
try { try {
......
...@@ -171,7 +171,7 @@ public class IndexCarouselManageController extends AbstractController { ...@@ -171,7 +171,7 @@ public class IndexCarouselManageController extends AbstractController {
*/ */
@Transactional @Transactional
@SysLog("审核首页轮播[indexcarouselmanage]") @SysLog("审核首页轮播[indexcarouselmanage]")
@PostMapping("/verifyIndexCarouselManage") @RequestMapping("/verifyIndexCarouselManage")
@RequiresPermissions("manage:indexcarouselmanage:check") @RequiresPermissions("manage:indexcarouselmanage:check")
public R verify(@RequestBody IndexCarouselManageEntity indexCarouselManage) { public R verify(@RequestBody IndexCarouselManageEntity indexCarouselManage) {
try { try {
...@@ -186,7 +186,7 @@ public class IndexCarouselManageController extends AbstractController { ...@@ -186,7 +186,7 @@ public class IndexCarouselManageController extends AbstractController {
@Transactional @Transactional
@SysLog("隐藏或显示首页轮播更多按钮[indexcarouselmanage]") @SysLog("隐藏或显示首页轮播更多按钮[indexcarouselmanage]")
@PostMapping("/updateIsShow") @RequestMapping("/updateIsShow")
@RequiresPermissions("manage:indexcarouselmanage:check") @RequiresPermissions("manage:indexcarouselmanage:check")
public R updateIsShow(@RequestBody IndexCarouselManageEntity indexCarouselManage) { public R updateIsShow(@RequestBody IndexCarouselManageEntity indexCarouselManage) {
try { try {
...@@ -203,7 +203,7 @@ public class IndexCarouselManageController extends AbstractController { ...@@ -203,7 +203,7 @@ public class IndexCarouselManageController extends AbstractController {
@Login @Login
@PostMapping("/api/bigImages") @RequestMapping("/api/bigImages")
// @RequiresPermissions("manage:indexcarouselmanage:bigImages") // @RequiresPermissions("manage:indexcarouselmanage:bigImages")
public R bigImages() { public R bigImages() {
try { try {
...@@ -222,7 +222,7 @@ public class IndexCarouselManageController extends AbstractController { ...@@ -222,7 +222,7 @@ public class IndexCarouselManageController extends AbstractController {
} }
@Login @Login
@PostMapping("/api/smallImages") @RequestMapping("/api/smallImages")
// @RequiresPermissions("manage:indexcarouselmanage:bigImages") // @RequiresPermissions("manage:indexcarouselmanage:bigImages")
public R smallImages() { public R smallImages() {
try { try {
......
...@@ -133,7 +133,7 @@ public class LogisticsController extends AbstractController { ...@@ -133,7 +133,7 @@ public class LogisticsController extends AbstractController {
@SysLog("审核物流管理[logistics]") @SysLog("审核物流管理[logistics]")
@Transactional @Transactional
@PostMapping("/verifyLogistics") @RequestMapping("/verifyLogistics")
@RequiresPermissions("manage:logistics:check") @RequiresPermissions("manage:logistics:check")
public R verifyMedical(@RequestBody LogisticsEntity logistics){ public R verifyMedical(@RequestBody LogisticsEntity logistics){
String username = getUser().getUsername(); String username = getUser().getUsername();
......
...@@ -135,7 +135,7 @@ public class MedicalController extends AbstractController { ...@@ -135,7 +135,7 @@ public class MedicalController extends AbstractController {
@SysLog("审核医疗管理[medical]") @SysLog("审核医疗管理[medical]")
@Transactional @Transactional
@PostMapping("/verifyMedical") @RequestMapping("/verifyMedical")
@RequiresPermissions("manage:medical:check") @RequiresPermissions("manage:medical:check")
public R verifyMedical(@RequestBody MedicalEntity medical) { public R verifyMedical(@RequestBody MedicalEntity medical) {
String username = getUser().getUsername(); String username = getUser().getUsername();
...@@ -150,7 +150,7 @@ public class MedicalController extends AbstractController { ...@@ -150,7 +150,7 @@ public class MedicalController extends AbstractController {
return R.ok("审核成功!"); return R.ok("审核成功!");
} }
@PostMapping("/api/getList10ByType") @RequestMapping("/api/getList10ByType")
public R getList10ByType(@RequestBody MedicalEntity medical) { public R getList10ByType(@RequestBody MedicalEntity medical) {
QueryWrapper<MedicalEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<MedicalEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.select("top 7 id,title "); queryWrapper.select("top 7 id,title ");
...@@ -182,7 +182,7 @@ public class MedicalController extends AbstractController { ...@@ -182,7 +182,7 @@ public class MedicalController extends AbstractController {
@Value("${token.count}") @Value("${token.count}")
private int tokenCountConfig; private int tokenCountConfig;
@PostMapping({"/api/getDetailById"}) @RequestMapping({"/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) {
......
...@@ -56,7 +56,7 @@ public class NewsController extends AbstractController { ...@@ -56,7 +56,7 @@ public class NewsController extends AbstractController {
/** /**
* 列表 * 列表
*/ */
@PostMapping("/list") @RequestMapping("/list")
@RequiresPermissions("manage:news:list") @RequiresPermissions("manage:news:list")
public R list(@RequestBody NewsParams newsParams) { public R list(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.newsService.selectNewsList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<NewsEntity> page = this.newsService.selectNewsList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
...@@ -98,7 +98,7 @@ public class NewsController extends AbstractController { ...@@ -98,7 +98,7 @@ public class NewsController extends AbstractController {
*/ */
@SysLog("保存文章管理[news]") @SysLog("保存文章管理[news]")
@Transactional @Transactional
@PostMapping("/save") @RequestMapping("/save")
@RequiresPermissions("manage:news:save") @RequiresPermissions("manage:news:save")
public R save(@RequestBody NewsEntity news) { public R save(@RequestBody NewsEntity news) {
try { try {
...@@ -115,7 +115,7 @@ public class NewsController extends AbstractController { ...@@ -115,7 +115,7 @@ public class NewsController extends AbstractController {
*/ */
@SysLog("修改文章管理[news]") @SysLog("修改文章管理[news]")
@Transactional @Transactional
@PostMapping("/update") @RequestMapping("/update")
@RequiresPermissions("manage:news:update") @RequiresPermissions("manage:news:update")
public R update(@RequestBody NewsEntity news) { public R update(@RequestBody NewsEntity news) {
try { try {
...@@ -132,7 +132,7 @@ public class NewsController extends AbstractController { ...@@ -132,7 +132,7 @@ public class NewsController extends AbstractController {
*/ */
@SysLog("删除文章管理[news]") @SysLog("删除文章管理[news]")
@Transactional @Transactional
@PostMapping("/delete") @RequestMapping("/delete")
@RequiresPermissions("manage:news:delete") @RequiresPermissions("manage:news:delete")
public R delete(@RequestBody List<Long> ids) { public R delete(@RequestBody List<Long> ids) {
try { try {
...@@ -159,7 +159,7 @@ public class NewsController extends AbstractController { ...@@ -159,7 +159,7 @@ public class NewsController extends AbstractController {
*/ */
@SysLog("审核文章管理[news]") @SysLog("审核文章管理[news]")
@Transactional @Transactional
@PostMapping("/verifyNews") @RequestMapping("/verifyNews")
@RequiresPermissions("manage:news:check") @RequiresPermissions("manage:news:check")
public R verify(@RequestBody NewsEntity news) { public R verify(@RequestBody NewsEntity news) {
try { try {
...@@ -176,7 +176,7 @@ public class NewsController extends AbstractController { ...@@ -176,7 +176,7 @@ public class NewsController extends AbstractController {
*/ */
@Login @Login
@PostMapping("/api/importantNewList") @RequestMapping("/api/importantNewList")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList") // @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R bigImages() { public R bigImages() {
try { try {
...@@ -191,7 +191,7 @@ public class NewsController extends AbstractController { ...@@ -191,7 +191,7 @@ public class NewsController extends AbstractController {
* 资讯中心 * 资讯中心
*/ */
@Login @Login
@PostMapping("/api/realTimeInfo") @RequestMapping("/api/realTimeInfo")
// @RequiresPermissions("manage:news:list") // @RequiresPermissions("manage:news:list")
public R realTimeInfo(@RequestBody NewsParams newsParams) { public R realTimeInfo(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.newsService.selectRealTimeInfo(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<NewsEntity> page = this.newsService.selectRealTimeInfo(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
...@@ -231,7 +231,12 @@ public class NewsController extends AbstractController { ...@@ -231,7 +231,12 @@ public class NewsController extends AbstractController {
//点击量+1 //点击量+1
NewsEntity newsUpdate = new NewsEntity(); NewsEntity newsUpdate = new NewsEntity();
newsUpdate.setHits(news.getHits()+1); if(newsUpdate.getHits()!=null) {
newsUpdate.setHits(news.getHits()+1);
} else{
newsUpdate.setHits(1);
}
UpdateWrapper<NewsEntity> updateWrapper = new UpdateWrapper(); UpdateWrapper<NewsEntity> updateWrapper = new UpdateWrapper();
updateWrapper.eq("id",id); updateWrapper.eq("id",id);
newsService.update(newsUpdate,updateWrapper); newsService.update(newsUpdate,updateWrapper);
...@@ -244,7 +249,7 @@ public class NewsController extends AbstractController { ...@@ -244,7 +249,7 @@ public class NewsController extends AbstractController {
*/ */
@Login @Login
@PostMapping("/api/industryApplication") @RequestMapping("/api/industryApplication")
public R industryApplication(@RequestBody NewsParams newsParams) { public R industryApplication(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.newsService.industryApplication(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<NewsEntity> page = this.newsService.industryApplication(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -256,7 +261,7 @@ public class NewsController extends AbstractController { ...@@ -256,7 +261,7 @@ public class NewsController extends AbstractController {
*/ */
@Login @Login
@PostMapping("/api/medicalList") @RequestMapping("/api/medicalList")
public R medicalList(@RequestBody NewsParams newsParams) { public R medicalList(@RequestBody NewsParams newsParams) {
Page<MedicalEntity> page = this.newsService.medicalList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<MedicalEntity> page = this.newsService.medicalList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -282,7 +287,7 @@ public class NewsController extends AbstractController { ...@@ -282,7 +287,7 @@ public class NewsController extends AbstractController {
*/ */
@Login @Login
@PostMapping("/api/iotList") @RequestMapping("/api/iotList")
public R iotList(@RequestBody NewsParams newsParams) { public R iotList(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.newsService.iotList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<NewsEntity> page = this.newsService.iotList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -294,7 +299,7 @@ public class NewsController extends AbstractController { ...@@ -294,7 +299,7 @@ public class NewsController extends AbstractController {
*/ */
@Login @Login
@PostMapping("/api/otherList") @RequestMapping("/api/otherList")
public R otherList(@RequestBody NewsParams newsParams) { public R otherList(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.newsService.otherList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<NewsEntity> page = this.newsService.otherList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -305,7 +310,7 @@ public class NewsController extends AbstractController { ...@@ -305,7 +310,7 @@ public class NewsController extends AbstractController {
* 食品安全追溯 * 食品安全追溯
*/ */
@Login @Login
@PostMapping("/api/foodSafetyList") @RequestMapping("/api/foodSafetyList")
public R foodSafetyList(@RequestBody NewsParams newsParams) { public R foodSafetyList(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.newsService.foodSafetyList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<NewsEntity> page = this.newsService.foodSafetyList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -318,7 +323,7 @@ public class NewsController extends AbstractController { ...@@ -318,7 +323,7 @@ public class NewsController extends AbstractController {
*/ */
@Login @Login
@PostMapping("/api/logostocsList") @RequestMapping("/api/logostocsList")
public R logostocsList(@RequestBody NewsParams newsParams) { public R logostocsList(@RequestBody NewsParams newsParams) {
Page<LogisticsEntity> page = this.newsService.logostocsList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<LogisticsEntity> page = this.newsService.logostocsList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -343,7 +348,7 @@ public class NewsController extends AbstractController { ...@@ -343,7 +348,7 @@ public class NewsController extends AbstractController {
* 应用动态 * 应用动态
*/ */
@Login @Login
@PostMapping("/api/yydtList") @RequestMapping("/api/yydtList")
public R yydtList(@RequestBody NewsParams newsParams) { public R yydtList(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.newsService.yydtList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<NewsEntity> page = this.newsService.yydtList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -354,7 +359,7 @@ public class NewsController extends AbstractController { ...@@ -354,7 +359,7 @@ public class NewsController extends AbstractController {
* 视频在线 * 视频在线
*/ */
@Login @Login
@PostMapping("/api/spList") @RequestMapping("/api/spList")
public R spList(@RequestBody NewsParams newsParams) { public R spList(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.newsService.spList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<NewsEntity> page = this.newsService.spList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -365,7 +370,7 @@ public class NewsController extends AbstractController { ...@@ -365,7 +370,7 @@ public class NewsController extends AbstractController {
* 公共通知 * 公共通知
*/ */
@Login @Login
@PostMapping("/api/announceList") @RequestMapping("/api/announceList")
public R announceList(@RequestBody NewsParams newsParams) { public R announceList(@RequestBody NewsParams newsParams) {
Page<AnnounceEntity> page = this.newsService.announceList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<AnnounceEntity> page = this.newsService.announceList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -411,7 +416,7 @@ public class NewsController extends AbstractController { ...@@ -411,7 +416,7 @@ public class NewsController extends AbstractController {
* 左侧标准文档 * 左侧标准文档
*/ */
@Login @Login
@PostMapping("/api/xgbzList") @RequestMapping("/api/xgbzList")
public R xgbzList(@RequestBody NewsParams newsParams) { public R xgbzList(@RequestBody NewsParams newsParams) {
Page<PolicyEntity> page = this.newsService.xgbzList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<PolicyEntity> page = this.newsService.xgbzList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -422,7 +427,7 @@ public class NewsController extends AbstractController { ...@@ -422,7 +427,7 @@ public class NewsController extends AbstractController {
* 右侧标准文档 * 右侧标准文档
*/ */
@Login @Login
@PostMapping("/api/ycxgbzList") @RequestMapping("/api/ycxgbzList")
public R ycxgbzList(@RequestBody NewsParams newsParams) { public R ycxgbzList(@RequestBody NewsParams newsParams) {
List<PolicyEntity> list = this.newsService.ycxgbzList(); List<PolicyEntity> list = this.newsService.ycxgbzList();
return R.ok().put("data", list); return R.ok().put("data", list);
...@@ -432,7 +437,7 @@ public class NewsController extends AbstractController { ...@@ -432,7 +437,7 @@ public class NewsController extends AbstractController {
* 政策法规 * 政策法规
*/ */
@Login @Login
@PostMapping("/api/zcfgList") @RequestMapping("/api/zcfgList")
public R zcfgList(@RequestBody NewsParams newsParams) { public R zcfgList(@RequestBody NewsParams newsParams) {
Page<PolicyEntity> page = this.newsService.zcfgList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<PolicyEntity> page = this.newsService.zcfgList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -443,7 +448,7 @@ public class NewsController extends AbstractController { ...@@ -443,7 +448,7 @@ public class NewsController extends AbstractController {
* 专业术语 * 专业术语
*/ */
@Login @Login
@PostMapping("/api/glossaryList") @RequestMapping("/api/glossaryList")
public R glossaryList(@RequestBody NewsParams newsParams) { public R glossaryList(@RequestBody NewsParams newsParams) {
List<GlossaryEntity> list = this.newsService.glossaryList(newsParams); List<GlossaryEntity> list = this.newsService.glossaryList(newsParams);
return R.ok().put("data", list); return R.ok().put("data", list);
...@@ -453,7 +458,7 @@ public class NewsController extends AbstractController { ...@@ -453,7 +458,7 @@ public class NewsController extends AbstractController {
* 小贴士 * 小贴士
*/ */
@Login @Login
@PostMapping("/api/tips") @RequestMapping("/api/tips")
public R tips(NewsParams newsParams) { public R tips(NewsParams newsParams) {
List<KnowledgeinfoEntity> list = this.newsService.selectTips(newsParams); List<KnowledgeinfoEntity> list = this.newsService.selectTips(newsParams);
return R.ok().put("data", list); return R.ok().put("data", list);
...@@ -463,7 +468,7 @@ public class NewsController extends AbstractController { ...@@ -463,7 +468,7 @@ public class NewsController extends AbstractController {
* 知识检索 * 知识检索
*/ */
@Login @Login
@PostMapping("/api/searchKnowledgeInfo") @RequestMapping("/api/searchKnowledgeInfo")
public R searchKnowledgeInfo(@RequestBody NewsParams newsParams) { public R searchKnowledgeInfo(@RequestBody NewsParams newsParams) {
Map<String, Object> retMap = this.newsService.searchKnowledgeInfo(newsParams); Map<String, Object> retMap = this.newsService.searchKnowledgeInfo(newsParams);
return R.ok().put("data", retMap); return R.ok().put("data", retMap);
...@@ -473,7 +478,7 @@ public class NewsController extends AbstractController { ...@@ -473,7 +478,7 @@ public class NewsController extends AbstractController {
* 知识检索下来分类 * 知识检索下来分类
*/ */
@Login @Login
@PostMapping("/api/searchKnowledgeInfoList") @RequestMapping("/api/searchKnowledgeInfoList")
public R searchKnowledgeInfoList() { public R searchKnowledgeInfoList() {
List<Map<String, Object>> retMap = this.newsService.searchKnowledgeInfoList(); List<Map<String, Object>> retMap = this.newsService.searchKnowledgeInfoList();
return R.ok().put("data", retMap); return R.ok().put("data", retMap);
...@@ -539,7 +544,7 @@ public class NewsController extends AbstractController { ...@@ -539,7 +544,7 @@ public class NewsController extends AbstractController {
* 知识检索分页列表 * 知识检索分页列表
*/ */
@Login @Login
@PostMapping("/api/searchKnowledgePageList") @RequestMapping("/api/searchKnowledgePageList")
public R searchKnowledgePageList(@RequestBody NewsParams params) { public R searchKnowledgePageList(@RequestBody NewsParams params) {
Page<List<Map<String, Object>>> page = this.newsService.searchKnowledgePageList(params, new Page(params.getPage(), params.getLimit())); Page<List<Map<String, Object>>> page = this.newsService.searchKnowledgePageList(params, new Page(params.getPage(), params.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -667,7 +672,7 @@ public class NewsController extends AbstractController { ...@@ -667,7 +672,7 @@ public class NewsController extends AbstractController {
@Login @Login
@PostMapping("/api/retailTop7Info") @RequestMapping("/api/retailTop7Info")
// @RequiresPermissions("manage:news:list") // @RequiresPermissions("manage:news:list")
public R RetailTop7Info() { public R RetailTop7Info() {
...@@ -686,7 +691,7 @@ public class NewsController extends AbstractController { ...@@ -686,7 +691,7 @@ public class NewsController extends AbstractController {
} }
@Login @Login
@PostMapping("/api/retailList") @RequestMapping("/api/retailList")
// @RequiresPermissions("manage:news:list") // @RequiresPermissions("manage:news:list")
public R retailList(@RequestBody Map<String, String> params) { public R retailList(@RequestBody Map<String, String> params) {
...@@ -704,7 +709,7 @@ public class NewsController extends AbstractController { ...@@ -704,7 +709,7 @@ public class NewsController extends AbstractController {
//首页商品二维码在零售领域的应用 //首页商品二维码在零售领域的应用
@Login @Login
@PostMapping("/api/retailCodeList") @RequestMapping("/api/retailCodeList")
// @RequiresPermissions("manage:news:list") // @RequiresPermissions("manage:news:list")
public R retailCodeTop6List(@RequestBody Map<String, String> params) { public R retailCodeTop6List(@RequestBody Map<String, String> params) {
...@@ -822,7 +827,7 @@ public class NewsController extends AbstractController { ...@@ -822,7 +827,7 @@ public class NewsController extends AbstractController {
/** /**
* 应用领域列表 * 应用领域列表
*/ */
@PostMapping("/yylyList") @RequestMapping("/yylyList")
//@RequiresPermissions("manage:news:list") //@RequiresPermissions("manage:news:list")
public R yylyList(@RequestBody NewsParams newsParams) { public R yylyList(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.newsService.selectYylyList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit())); Page<NewsEntity> page = this.newsService.selectYylyList(newsParams, new Page(newsParams.getPage(), newsParams.getLimit()));
......
...@@ -134,7 +134,7 @@ public class NewsMovieController extends AbstractController { ...@@ -134,7 +134,7 @@ public class NewsMovieController extends AbstractController {
SysUserEntity user = getUser(); SysUserEntity user = getUser();
NewsMovieEntity newsMovieEntity = new NewsMovieEntity(); NewsMovieEntity newsMovieEntity = new NewsMovieEntity();
// newsMovieEntity.setAuditor(user.getUsername()); newsMovieEntity.setAuditor(user.getUsername());
BeanUtils.copyProperties(newsMovieEntityVo, newsMovieEntity); BeanUtils.copyProperties(newsMovieEntityVo, newsMovieEntity);
QueryWrapper<NewsMovieEntity> newsMovieEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<NewsMovieEntity> newsMovieEntityQueryWrapper = new QueryWrapper<>();
newsMovieEntityQueryWrapper.eq("id", newsMovieEntityVo.getId()); newsMovieEntityQueryWrapper.eq("id", newsMovieEntityVo.getId());
......
...@@ -134,7 +134,7 @@ public class NewtopicController extends AbstractController { ...@@ -134,7 +134,7 @@ public class NewtopicController extends AbstractController {
Date date = new Date(); Date date = new Date();
SysUserEntity user = getUser(); SysUserEntity user = getUser();
NewtopicEntity newtopicEntity = new NewtopicEntity(); NewtopicEntity newtopicEntity = new NewtopicEntity();
// newtopicEntity.setAuditor(user.getUsername()); newtopicEntity.setAuditor(user.getUsername());
newtopicEntity.setCheckflag(Integer.valueOf(params.getStatus())); newtopicEntity.setCheckflag(Integer.valueOf(params.getStatus()));
QueryWrapper<NewtopicEntity> newtopicEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<NewtopicEntity> newtopicEntityQueryWrapper = new QueryWrapper<>();
newtopicEntityQueryWrapper.eq("classid",newtopicEntity.getClassid()); newtopicEntityQueryWrapper.eq("classid",newtopicEntity.getClassid());
......
...@@ -46,7 +46,7 @@ public class PartnersController extends AbstractController { ...@@ -46,7 +46,7 @@ public class PartnersController extends AbstractController {
/** /**
* 列表 * 列表
*/ */
@PostMapping("/list") @RequestMapping("/list")
// @RequiresPermissions("manage:partners:list") // @RequiresPermissions("manage:partners:list")
public R list(@RequestBody NewsParams newsParams){ public R list(@RequestBody NewsParams newsParams){
Page<PartnersEntity> page = this.partnersService.selectPartnersList(newsParams, Page<PartnersEntity> page = this.partnersService.selectPartnersList(newsParams,
...@@ -85,7 +85,7 @@ public class PartnersController extends AbstractController { ...@@ -85,7 +85,7 @@ public class PartnersController extends AbstractController {
*/ */
@SysLog("保存提供商[partners]") @SysLog("保存提供商[partners]")
@Transactional @Transactional
@PostMapping("/save") @RequestMapping("/save")
@RequiresPermissions("standard:partners:save") @RequiresPermissions("standard:partners:save")
public R save(@RequestBody PartnersEntity partners){ public R save(@RequestBody PartnersEntity partners){
partners.setEditor(getUser().getUsername()); partners.setEditor(getUser().getUsername());
...@@ -101,7 +101,7 @@ public class PartnersController extends AbstractController { ...@@ -101,7 +101,7 @@ public class PartnersController extends AbstractController {
*/ */
@SysLog("修改提供商[partners]") @SysLog("修改提供商[partners]")
@Transactional @Transactional
@PostMapping("/update") @RequestMapping("/update")
@RequiresPermissions("standard:partners:update") @RequiresPermissions("standard:partners:update")
public R update(@RequestBody PartnersEntity partners){ public R update(@RequestBody PartnersEntity partners){
partners.setEditor(getUser().getUsername()); partners.setEditor(getUser().getUsername());
...@@ -116,7 +116,7 @@ public class PartnersController extends AbstractController { ...@@ -116,7 +116,7 @@ public class PartnersController extends AbstractController {
*/ */
@SysLog("删除提供商[partners]") @SysLog("删除提供商[partners]")
@Transactional @Transactional
@PostMapping("/delete") @RequestMapping("/delete")
@RequiresPermissions("standard:partners:delete") @RequiresPermissions("standard:partners:delete")
public R delete(@RequestBody List<Long> ids){ public R delete(@RequestBody List<Long> ids){
try { try {
...@@ -145,7 +145,7 @@ public class PartnersController extends AbstractController { ...@@ -145,7 +145,7 @@ public class PartnersController extends AbstractController {
*/ */
@SysLog("审核提供商[partners]") @SysLog("审核提供商[partners]")
@Transactional @Transactional
@PostMapping("/verifyPartners") @RequestMapping("/verifyPartners")
@RequiresPermissions("standard:partners:check") @RequiresPermissions("standard:partners:check")
public R verifyPartners(@RequestBody PartnersEntity partnersEntity){ public R verifyPartners(@RequestBody PartnersEntity partnersEntity){
try { try {
......
...@@ -132,7 +132,7 @@ public class PictureController extends AbstractController { ...@@ -132,7 +132,7 @@ public class PictureController extends AbstractController {
*/ */
@SysLog("审核图片资讯[picture]") @SysLog("审核图片资讯[picture]")
@Transactional @Transactional
@PostMapping("/verifyPicture") @RequestMapping("/verifyPicture")
@RequiresPermissions("manage:picture:check") @RequiresPermissions("manage:picture:check")
public R verify(@RequestBody PictureEntity picture) { public R verify(@RequestBody PictureEntity picture) {
try { try {
...@@ -145,7 +145,7 @@ public class PictureController extends AbstractController { ...@@ -145,7 +145,7 @@ public class PictureController extends AbstractController {
} }
@Login @Login
@PostMapping("/api/pictureImageList") @RequestMapping("/api/pictureImageList")
// @RequiresPermissions("manage:indexcarouselmanage:pictureImageList") // @RequiresPermissions("manage:indexcarouselmanage:pictureImageList")
public R bigImages() { public R bigImages() {
try { try {
...@@ -169,7 +169,7 @@ public class PictureController extends AbstractController { ...@@ -169,7 +169,7 @@ public class PictureController extends AbstractController {
@Login @Login
@PostMapping("/api/pictureList") @RequestMapping("/api/pictureList")
// @RequiresPermissions("manage:indexcarouselmanage:pictureImageList") // @RequiresPermissions("manage:indexcarouselmanage:pictureImageList")
public R pictureList(@RequestBody NewsParams params) { public R pictureList(@RequestBody NewsParams params) {
try { try {
...@@ -223,7 +223,7 @@ public class PictureController extends AbstractController { ...@@ -223,7 +223,7 @@ public class PictureController extends AbstractController {
@Login @Login
@PostMapping("/api/retailPictureList") @RequestMapping("/api/retailPictureList")
// @RequiresPermissions("manage:indexcarouselmanage:pictureImageList") // @RequiresPermissions("manage:indexcarouselmanage:pictureImageList")
public R retailPictureList(@RequestBody Map<String, String> params) { public R retailPictureList(@RequestBody Map<String, String> params) {
try { try {
......
...@@ -131,7 +131,7 @@ public class PolicyController extends AbstractController { ...@@ -131,7 +131,7 @@ public class PolicyController extends AbstractController {
*/ */
@SysLog("审核政策法规规定管理[policy]") @SysLog("审核政策法规规定管理[policy]")
@Transactional @Transactional
@PostMapping("/verifyPolicy") @RequestMapping("/verifyPolicy")
@RequiresPermissions("manage:policy:check") @RequiresPermissions("manage:policy:check")
public R verify(@RequestBody PolicyEntity policyEntity) { public R verify(@RequestBody PolicyEntity policyEntity) {
try { try {
...@@ -145,7 +145,7 @@ public class PolicyController extends AbstractController { ...@@ -145,7 +145,7 @@ public class PolicyController extends AbstractController {
@Login @Login
@PostMapping("/api/getTop4") @RequestMapping("/api/getTop4")
// @RequiresPermissions("manage:indexcarouselmanage:pictureImageList") // @RequiresPermissions("manage:indexcarouselmanage:pictureImageList")
public R getTop4() { public R getTop4() {
try { try {
...@@ -165,7 +165,7 @@ public class PolicyController extends AbstractController { ...@@ -165,7 +165,7 @@ public class PolicyController extends AbstractController {
} }
@Login @Login
@PostMapping("/api/policyList") @RequestMapping("/api/policyList")
// @RequiresPermissions("manage:indexcarouselmanage:pictureImageList") // @RequiresPermissions("manage:indexcarouselmanage:pictureImageList")
public R policyList(@RequestBody NewsParams params) { public R policyList(@RequestBody NewsParams params) {
// try { // try {
...@@ -226,7 +226,12 @@ public class PolicyController extends AbstractController { ...@@ -226,7 +226,12 @@ public class PolicyController extends AbstractController {
} }
//点击量+1 //点击量+1
PolicyEntity policyUpdate = new PolicyEntity(); PolicyEntity policyUpdate = new PolicyEntity();
policyUpdate.setHits(policyUpdate.getHits()+1); if(policyUpdate.getHits()!=null){
policyUpdate.setHits(policyUpdate.getHits()+1);
} else{
policyUpdate.setHits(1);
}
UpdateWrapper<PolicyEntity> updateWrapper = new UpdateWrapper(); UpdateWrapper<PolicyEntity> updateWrapper = new UpdateWrapper();
updateWrapper.eq("id",id); updateWrapper.eq("id",id);
policyService.update(policyUpdate,updateWrapper); policyService.update(policyUpdate,updateWrapper);
......
...@@ -126,7 +126,7 @@ public class ProductController extends AbstractController { ...@@ -126,7 +126,7 @@ public class ProductController extends AbstractController {
*/ */
@SysLog("审核商品[product]") @SysLog("审核商品[product]")
@Transactional @Transactional
@PostMapping("/verifyProduct") @RequestMapping("/verifyProduct")
@RequiresPermissions("plate:product:check") @RequiresPermissions("plate:product:check")
public R verify(@RequestBody ProductEntity product) { public R verify(@RequestBody ProductEntity product) {
try { try {
......
...@@ -25,7 +25,7 @@ public class ProductionController { ...@@ -25,7 +25,7 @@ public class ProductionController {
SysCaptchaService sysCaptchaService; SysCaptchaService sysCaptchaService;
@Login @Login
@PostMapping("/search") @RequestMapping("/search")
public R search(@RequestBody ProductionVo productionVo) { public R search(@RequestBody ProductionVo productionVo) {
boolean captcha = sysCaptchaService.validate(productionVo.getUuid(), productionVo.getCaptcha()); boolean captcha = sysCaptchaService.validate(productionVo.getUuid(), productionVo.getCaptcha());
......
...@@ -96,7 +96,7 @@ public class RetailController { ...@@ -96,7 +96,7 @@ public class RetailController {
* @return * @return
*/ */
@Login @Login
@PostMapping("/api/guideList") @RequestMapping("/api/guideList")
public R guideList(@RequestParam Map<String, Object> params) { public R guideList(@RequestParam Map<String, Object> params) {
PageUtils page = retailService.queryPageList(params); PageUtils page = retailService.queryPageList(params);
return R.ok().put("data", page); return R.ok().put("data", page);
......
...@@ -135,7 +135,7 @@ public class RetailpictureController extends AbstractController { ...@@ -135,7 +135,7 @@ public class RetailpictureController extends AbstractController {
*/ */
@SysLog("审核零售图片[retailPicture]") @SysLog("审核零售图片[retailPicture]")
@Transactional @Transactional
@PostMapping("/verifyPicture") @RequestMapping("/verifyPicture")
@RequiresPermissions("manage:retailPicture:check") @RequiresPermissions("manage:retailPicture:check")
public R verify(@RequestBody RetailpictureEntity picture) { public R verify(@RequestBody RetailpictureEntity picture) {
try { try {
......
...@@ -130,7 +130,7 @@ public class RulesAndRegulationsController extends AbstractController { ...@@ -130,7 +130,7 @@ public class RulesAndRegulationsController extends AbstractController {
*/ */
@SysLog("审核规章制度[rules]") @SysLog("审核规章制度[rules]")
@Transactional @Transactional
@PostMapping("/verifyTopic") @RequestMapping("/verifyTopic")
@RequiresPermissions("manage:rules:check") @RequiresPermissions("manage:rules:check")
public R verify(@RequestBody NewsEntity news) { public R verify(@RequestBody NewsEntity news) {
try { try {
......
...@@ -132,7 +132,7 @@ public class TopicnewsController extends AbstractController { ...@@ -132,7 +132,7 @@ public class TopicnewsController extends AbstractController {
*/ */
@SysLog("审核活动报道[topicnews]") @SysLog("审核活动报道[topicnews]")
@Transactional @Transactional
@PostMapping("/verifyTopic") @RequestMapping("/verifyTopic")
@RequiresPermissions("manage:news:check") @RequiresPermissions("manage:news:check")
public R verify(@RequestBody NewsEntity news) { public R verify(@RequestBody NewsEntity news) {
try { try {
...@@ -146,7 +146,7 @@ public class TopicnewsController extends AbstractController { ...@@ -146,7 +146,7 @@ public class TopicnewsController extends AbstractController {
@Login @Login
@PostMapping("/api/get4PartyTopNews") @RequestMapping("/api/get4PartyTopNews")
// @RequiresPermissions("manage:indexcarouselmanage:pictureImageList") // @RequiresPermissions("manage:indexcarouselmanage:pictureImageList")
public R get4PartyTopNews(@RequestBody TopicNewsPartyRequestVo topicNewsPartyRequestVo) { public R get4PartyTopNews(@RequestBody TopicNewsPartyRequestVo topicNewsPartyRequestVo) {
try { try {
...@@ -158,7 +158,7 @@ public class TopicnewsController extends AbstractController { ...@@ -158,7 +158,7 @@ public class TopicnewsController extends AbstractController {
} }
@Login @Login
@PostMapping("/api/getHdbdList") @RequestMapping("/api/getHdbdList")
// @RequiresPermissions("manage:indexcarouselmanage:pictureImageList") // @RequiresPermissions("manage:indexcarouselmanage:pictureImageList")
public R getHdbdList(@RequestBody NewsParams newsParams) { public R getHdbdList(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.topicnewsService.getHdbdList(newsParams, Page<NewsEntity> page = this.topicnewsService.getHdbdList(newsParams,
......
...@@ -58,7 +58,7 @@ public class AnnounceServiceImpl extends ServiceImpl<AnnounceDao, AnnounceEntity ...@@ -58,7 +58,7 @@ public class AnnounceServiceImpl extends ServiceImpl<AnnounceDao, AnnounceEntity
public R verify(AnnounceEntity announce, SysUserEntity user) { public R verify(AnnounceEntity announce, SysUserEntity user) {
//announce.setUpdatedate(new Date()); //announce.setUpdatedate(new Date());
//announce.setEditor(user.getUsername()); //announce.setEditor(user.getUsername());
//announce.setAuditor(user.getUsername()); announce.setAuditor(user.getUsername());
QueryWrapper<AnnounceEntity> newsEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<AnnounceEntity> newsEntityQueryWrapper = new QueryWrapper<>();
newsEntityQueryWrapper.eq("id",announce.getId()); newsEntityQueryWrapper.eq("id",announce.getId());
announceDao.update(announce, newsEntityQueryWrapper); announceDao.update(announce, newsEntityQueryWrapper);
......
...@@ -88,7 +88,7 @@ public class CasesServiceImpl extends ServiceImpl<CasesDao, CasesEntity> impleme ...@@ -88,7 +88,7 @@ public class CasesServiceImpl extends ServiceImpl<CasesDao, CasesEntity> impleme
public R verify(CasesEntity casesEntity, SysUserEntity user) { public R verify(CasesEntity casesEntity, SysUserEntity user) {
QueryWrapper<CasesEntity> partnersEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<CasesEntity> partnersEntityQueryWrapper = new QueryWrapper<>();
partnersEntityQueryWrapper.in("id",casesEntity.getId()); partnersEntityQueryWrapper.in("id",casesEntity.getId());
//casesEntity.setAuditor(user.getUsername()); casesEntity.setAuditor(user.getUsername());
casesEntity.setCheckdate(new Date()); casesEntity.setCheckdate(new Date());
int update = this.baseMapper.update(casesEntity, partnersEntityQueryWrapper); int update = this.baseMapper.update(casesEntity, partnersEntityQueryWrapper);
if(update>0){ if(update>0){
......
...@@ -55,7 +55,7 @@ public class DocServiceImpl extends ServiceImpl<DocDao, DocEntity> implements Do ...@@ -55,7 +55,7 @@ public class DocServiceImpl extends ServiceImpl<DocDao, DocEntity> implements Do
public void verifyDoc(DocEntity doc,SysUserEntity user) { public void verifyDoc(DocEntity doc,SysUserEntity user) {
QueryWrapper<DocEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<DocEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("id",doc.getId()); queryWrapper.in("id",doc.getId());
// doc.setAuditor(user.getUsername()); doc.setAuditor(user.getUsername());
this.baseMapper.update(doc,queryWrapper); this.baseMapper.update(doc,queryWrapper);
} }
......
...@@ -103,7 +103,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements ...@@ -103,7 +103,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override @Override
public R verifyNews(NewsEntity news, SysUserEntity user) { public R verifyNews(NewsEntity news, SysUserEntity user) {
//news.setAuditor(user.getUsername()); news.setAuditor(user.getUsername());
news.setCheckdate(new Date()); news.setCheckdate(new Date());
//news.setLasteditor(user.getUsername()); //news.setLasteditor(user.getUsername());
QueryWrapper<NewsEntity> newsEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<NewsEntity> newsEntityQueryWrapper = new QueryWrapper<>();
......
...@@ -67,7 +67,7 @@ public class PartnersServiceImpl extends ServiceImpl<PartnersDao, PartnersEntity ...@@ -67,7 +67,7 @@ public class PartnersServiceImpl extends ServiceImpl<PartnersDao, PartnersEntity
public R verifyPartners(PartnersEntity partnersEntity, SysUserEntity user) { public R verifyPartners(PartnersEntity partnersEntity, SysUserEntity user) {
QueryWrapper<PartnersEntity> partnersEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<PartnersEntity> partnersEntityQueryWrapper = new QueryWrapper<>();
partnersEntityQueryWrapper.in("id",partnersEntity.getId()); partnersEntityQueryWrapper.in("id",partnersEntity.getId());
// partnersEntity.setAuditor(user.getUsername()); partnersEntity.setAuditor(user.getUsername());
partnersEntity.setCheckdate(new Date()); partnersEntity.setCheckdate(new Date());
int update = this.baseMapper.update(partnersEntity, partnersEntityQueryWrapper); int update = this.baseMapper.update(partnersEntity, partnersEntityQueryWrapper);
if(update>0){ if(update>0){
......
...@@ -91,7 +91,7 @@ public class PictureServiceImpl extends ServiceImpl<PictureDao, PictureEntity> i ...@@ -91,7 +91,7 @@ public class PictureServiceImpl extends ServiceImpl<PictureDao, PictureEntity> i
@Override @Override
public R verifyPicture(PictureEntity picture, SysUserEntity user) { public R verifyPicture(PictureEntity picture, SysUserEntity user) {
// picture.setAuditor(user.getUsername()); picture.setAuditor(user.getUsername());
picture.setInputdate(new Date()); picture.setInputdate(new Date());
// picture.setLasteditor(user.getUsername()); // picture.setLasteditor(user.getUsername());
QueryWrapper<PictureEntity> newsEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<PictureEntity> newsEntityQueryWrapper = new QueryWrapper<>();
......
...@@ -91,7 +91,7 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyDao, PolicyEntity> impl ...@@ -91,7 +91,7 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyDao, PolicyEntity> impl
@Override @Override
public R verifyTopic(PolicyEntity policyEntity, SysUserEntity user) { public R verifyTopic(PolicyEntity policyEntity, SysUserEntity user) {
// policyEntity.setAuditor(user.getUsername()); policyEntity.setAuditor(user.getUsername());
// policyEntity.setLasteditor(user.getUsername()); // policyEntity.setLasteditor(user.getUsername());
QueryWrapper<PolicyEntity> newsEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<PolicyEntity> newsEntityQueryWrapper = new QueryWrapper<>();
newsEntityQueryWrapper.eq("id",policyEntity.getId()); newsEntityQueryWrapper.eq("id",policyEntity.getId());
......
...@@ -63,7 +63,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i ...@@ -63,7 +63,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductDao, ProductEntity> i
@Override @Override
public R verifyProduct(ProductEntity product, SysUserEntity user) { public R verifyProduct(ProductEntity product, SysUserEntity user) {
// product.setAuditor(user.getUsername()); product.setAuditor(user.getUsername());
QueryWrapper<ProductEntity> newsEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<ProductEntity> newsEntityQueryWrapper = new QueryWrapper<>();
newsEntityQueryWrapper.in("id",product.getId()); newsEntityQueryWrapper.in("id",product.getId());
int delete = baseMapper.update(product, newsEntityQueryWrapper); int delete = baseMapper.update(product, newsEntityQueryWrapper);
......
...@@ -87,7 +87,7 @@ public class RetailpictureServiceImpl extends ServiceImpl<RetailpictureDao, Reta ...@@ -87,7 +87,7 @@ public class RetailpictureServiceImpl extends ServiceImpl<RetailpictureDao, Reta
@Override @Override
public R verifyPicture(RetailpictureEntity picture, SysUserEntity user) { public R verifyPicture(RetailpictureEntity picture, SysUserEntity user) {
// picture.setAuditor(user.getUsername()); picture.setAuditor(user.getUsername());
// picture.setInputdate(new Date()); // picture.setInputdate(new Date());
// picture.setLasteditor(user.getUsername()); // picture.setLasteditor(user.getUsername());
QueryWrapper<RetailpictureEntity> newsEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<RetailpictureEntity> newsEntityQueryWrapper = new QueryWrapper<>();
......
...@@ -92,7 +92,7 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt ...@@ -92,7 +92,7 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt
@Override @Override
public R verifyTopic(NewsEntity news, SysUserEntity user) { public R verifyTopic(NewsEntity news, SysUserEntity user) {
// news.setAuditor(user.getUsername()); news.setAuditor(user.getUsername());
news.setCheckdate(new Date()); news.setCheckdate(new Date());
// news.setLasteditor(user.getUsername()); // news.setLasteditor(user.getUsername());
QueryWrapper<NewsEntity> newsEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<NewsEntity> newsEntityQueryWrapper = new QueryWrapper<>();
......
...@@ -74,7 +74,7 @@ public class SysOssController { ...@@ -74,7 +74,7 @@ public class SysOssController {
/** /**
* 保存云存储配置信息 * 保存云存储配置信息
*/ */
@PostMapping("/saveConfig") @RequestMapping("/saveConfig")
@RequiresPermissions("sys:oss:all") @RequiresPermissions("sys:oss:all")
public R saveConfig(@RequestBody CloudStorageConfig config){ public R saveConfig(@RequestBody CloudStorageConfig config){
//校验类型 //校验类型
...@@ -100,7 +100,7 @@ public class SysOssController { ...@@ -100,7 +100,7 @@ public class SysOssController {
/** /**
* 上传文件 * 上传文件
*/ */
@PostMapping("/upload") @RequestMapping("/upload")
@RequiresPermissions("sys:oss:all") @RequiresPermissions("sys:oss:all")
public R upload(@RequestParam("file") MultipartFile file) throws Exception { public R upload(@RequestParam("file") MultipartFile file) throws Exception {
if (file.isEmpty()) { if (file.isEmpty()) {
...@@ -124,7 +124,7 @@ public class SysOssController { ...@@ -124,7 +124,7 @@ public class SysOssController {
/** /**
* 删除 * 删除
*/ */
@PostMapping("/delete") @RequestMapping("/delete")
@RequiresPermissions("sys:oss:all") @RequiresPermissions("sys:oss:all")
public R delete(@RequestBody Long[] ids){ public R delete(@RequestBody Long[] ids){
sysOssService.removeByIds(Arrays.asList(ids)); sysOssService.removeByIds(Arrays.asList(ids));
......
...@@ -59,7 +59,7 @@ public class SysConfigController extends AbstractController { ...@@ -59,7 +59,7 @@ public class SysConfigController extends AbstractController {
* 保存配置 * 保存配置
*/ */
@SysLog("保存配置") @SysLog("保存配置")
@PostMapping("/save") @RequestMapping("/save")
@RequiresPermissions("sys:config:save") @RequiresPermissions("sys:config:save")
public R save(@RequestBody SysConfigEntity config){ public R save(@RequestBody SysConfigEntity config){
ValidatorUtils.validateEntity(config); ValidatorUtils.validateEntity(config);
...@@ -73,7 +73,7 @@ public class SysConfigController extends AbstractController { ...@@ -73,7 +73,7 @@ public class SysConfigController extends AbstractController {
* 修改配置 * 修改配置
*/ */
@SysLog("修改配置") @SysLog("修改配置")
@PostMapping("/update") @RequestMapping("/update")
@RequiresPermissions("sys:config:update") @RequiresPermissions("sys:config:update")
public R update(@RequestBody SysConfigEntity config){ public R update(@RequestBody SysConfigEntity config){
ValidatorUtils.validateEntity(config); ValidatorUtils.validateEntity(config);
...@@ -87,7 +87,7 @@ public class SysConfigController extends AbstractController { ...@@ -87,7 +87,7 @@ public class SysConfigController extends AbstractController {
* 删除配置 * 删除配置
*/ */
@SysLog("删除配置") @SysLog("删除配置")
@PostMapping("/delete") @RequestMapping("/delete")
@RequiresPermissions("sys:config:delete") @RequiresPermissions("sys:config:delete")
public R delete(@RequestBody Long[] ids){ public R delete(@RequestBody Long[] ids){
sysConfigService.deleteBatch(ids); sysConfigService.deleteBatch(ids);
......
...@@ -18,10 +18,7 @@ import io.office.modules.sys.service.SysUserTokenService; ...@@ -18,10 +18,7 @@ import io.office.modules.sys.service.SysUserTokenService;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.shiro.crypto.hash.Sha256Hash; import org.apache.shiro.crypto.hash.Sha256Hash;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
...@@ -64,7 +61,7 @@ public class SysLoginController extends AbstractController { ...@@ -64,7 +61,7 @@ public class SysLoginController extends AbstractController {
* 登录 * 登录
*/ */
@Login @Login
@PostMapping("/sys/login") @RequestMapping("/sys/login")
public Map<String, Object> login(@RequestBody SysLoginForm form)throws IOException { public Map<String, Object> login(@RequestBody SysLoginForm form)throws IOException {
/*boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha()); /*boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
if(!captcha){ if(!captcha){
...@@ -93,7 +90,7 @@ public class SysLoginController extends AbstractController { ...@@ -93,7 +90,7 @@ public class SysLoginController extends AbstractController {
/** /**
* 退出 * 退出
*/ */
@PostMapping("/sys/logout") @RequestMapping("/sys/logout")
public R logout() { public R logout() {
sysUserTokenService.logout(getUserId()); sysUserTokenService.logout(getUserId());
return R.ok(); return R.ok();
......
...@@ -105,7 +105,7 @@ public class SysMenuController extends AbstractController { ...@@ -105,7 +105,7 @@ public class SysMenuController extends AbstractController {
* 保存 * 保存
*/ */
@SysLog("保存菜单") @SysLog("保存菜单")
@PostMapping("/save") @RequestMapping("/save")
@RequiresPermissions("sys:menu:save") @RequiresPermissions("sys:menu:save")
public R save(@RequestBody SysMenuEntity menu){ public R save(@RequestBody SysMenuEntity menu){
//数据校验 //数据校验
...@@ -120,7 +120,7 @@ public class SysMenuController extends AbstractController { ...@@ -120,7 +120,7 @@ public class SysMenuController extends AbstractController {
* 修改 * 修改
*/ */
@SysLog("修改菜单") @SysLog("修改菜单")
@PostMapping("/update") @RequestMapping("/update")
@RequiresPermissions("sys:menu:update") @RequiresPermissions("sys:menu:update")
public R update(@RequestBody SysMenuEntity menu){ public R update(@RequestBody SysMenuEntity menu){
//数据校验 //数据校验
...@@ -135,7 +135,7 @@ public class SysMenuController extends AbstractController { ...@@ -135,7 +135,7 @@ public class SysMenuController extends AbstractController {
* 删除 * 删除
*/ */
@SysLog("删除菜单") @SysLog("删除菜单")
@PostMapping("/delete/{menuId}") @RequestMapping("/delete/{menuId}")
@RequiresPermissions("sys:menu:delete") @RequiresPermissions("sys:menu:delete")
public R delete(@PathVariable("menuId") long menuId){ public R delete(@PathVariable("menuId") long menuId){
if(menuId <= 31){ if(menuId <= 31){
......
...@@ -89,7 +89,7 @@ public class SysRoleController extends AbstractController { ...@@ -89,7 +89,7 @@ public class SysRoleController extends AbstractController {
* 保存角色 * 保存角色
*/ */
@SysLog("保存角色") @SysLog("保存角色")
@PostMapping("/save") @RequestMapping("/save")
@RequiresPermissions("sys:role:save") @RequiresPermissions("sys:role:save")
public R save(@RequestBody SysRoleEntity role){ public R save(@RequestBody SysRoleEntity role){
ValidatorUtils.validateEntity(role); ValidatorUtils.validateEntity(role);
...@@ -104,7 +104,7 @@ public class SysRoleController extends AbstractController { ...@@ -104,7 +104,7 @@ public class SysRoleController extends AbstractController {
* 修改角色 * 修改角色
*/ */
@SysLog("修改角色") @SysLog("修改角色")
@PostMapping("/update") @RequestMapping("/update")
@RequiresPermissions("sys:role:update") @RequiresPermissions("sys:role:update")
public R update(@RequestBody SysRoleEntity role){ public R update(@RequestBody SysRoleEntity role){
ValidatorUtils.validateEntity(role); ValidatorUtils.validateEntity(role);
...@@ -119,7 +119,7 @@ public class SysRoleController extends AbstractController { ...@@ -119,7 +119,7 @@ public class SysRoleController extends AbstractController {
* 删除角色 * 删除角色
*/ */
@SysLog("删除角色") @SysLog("删除角色")
@PostMapping("/delete") @RequestMapping("/delete")
@RequiresPermissions("sys:role:delete") @RequiresPermissions("sys:role:delete")
public R delete(@RequestBody Long[] roleIds){ public R delete(@RequestBody Long[] roleIds){
sysRoleService.deleteBatch(roleIds); sysRoleService.deleteBatch(roleIds);
......
...@@ -70,7 +70,7 @@ public class SysUserController extends AbstractController { ...@@ -70,7 +70,7 @@ public class SysUserController extends AbstractController {
* 修改登录用户密码 * 修改登录用户密码
*/ */
@SysLog("修改密码") @SysLog("修改密码")
@PostMapping("/password") @RequestMapping("/password")
public R password(@RequestBody PasswordForm form){ public R password(@RequestBody PasswordForm form){
Assert.isBlank(form.getNewPassword(), "新密码不为能空"); Assert.isBlank(form.getNewPassword(), "新密码不为能空");
...@@ -107,7 +107,7 @@ public class SysUserController extends AbstractController { ...@@ -107,7 +107,7 @@ public class SysUserController extends AbstractController {
* 保存用户 * 保存用户
*/ */
@SysLog("保存用户") @SysLog("保存用户")
@PostMapping("/save") @RequestMapping("/save")
@RequiresPermissions("sys:user:save") @RequiresPermissions("sys:user:save")
public R save(@RequestBody SysUserEntity user){ public R save(@RequestBody SysUserEntity user){
ValidatorUtils.validateEntity(user, AddGroup.class); ValidatorUtils.validateEntity(user, AddGroup.class);
...@@ -122,7 +122,7 @@ public class SysUserController extends AbstractController { ...@@ -122,7 +122,7 @@ public class SysUserController extends AbstractController {
* 修改用户 * 修改用户
*/ */
@SysLog("修改用户") @SysLog("修改用户")
@PostMapping("/update") @RequestMapping("/update")
@RequiresPermissions("sys:user:update") @RequiresPermissions("sys:user:update")
public R update(@RequestBody SysUserEntity user){ public R update(@RequestBody SysUserEntity user){
ValidatorUtils.validateEntity(user, UpdateGroup.class); ValidatorUtils.validateEntity(user, UpdateGroup.class);
...@@ -137,7 +137,7 @@ public class SysUserController extends AbstractController { ...@@ -137,7 +137,7 @@ public class SysUserController extends AbstractController {
* 删除用户 * 删除用户
*/ */
@SysLog("删除用户") @SysLog("删除用户")
@PostMapping("/delete") @RequestMapping("/delete")
@RequiresPermissions("sys:user:delete") @RequiresPermissions("sys:user:delete")
public R delete(@RequestBody Long[] userIds){ public R delete(@RequestBody Long[] userIds){
if(ArrayUtils.contains(userIds, 1L)){ if(ArrayUtils.contains(userIds, 1L)){
......
...@@ -70,7 +70,7 @@ logging: ...@@ -70,7 +70,7 @@ logging:
org: org:
mybatis: debug mybatis: debug
dao: debug dao: debug
#预览次数控制
token.count: 3 token.count: 5
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<select id="domesticCodeUpdateList" parameterType="string" resultType="io.office.modules.manage.vo.response.DomesticCodeUpdateResponse"> <select id="domesticCodeUpdateList" parameterType="string" resultType="io.office.modules.manage.vo.response.DomesticCodeUpdateResponse">
SELECT SELECT
FIRM_NAME, top 1 FIRM_NAME,
FIRM_NAME_NOW, FIRM_NAME_NOW,
AUDIT_DATE AUDIT_DATE
FROM FROM
......
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