重构push
This commit is contained in:
parent
f7a5815805
commit
29f45b675e
|
|
@ -28,13 +28,12 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
* 推送接收明细Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Api(tags = "推送接收明细接口")
|
||||
@RestController
|
||||
@RequestMapping("/push_data_receive_detail")
|
||||
public class PushDataReceiveDetailController extends BaseController
|
||||
{
|
||||
public class PushDataReceiveDetailController extends BaseController {
|
||||
@Autowired
|
||||
private IPushDataReceiveDetailService pushDataReceiveDetailService;
|
||||
|
||||
|
|
@ -44,8 +43,7 @@ public class PushDataReceiveDetailController extends BaseController
|
|||
@ApiOperation(value = "查询推送接收明细列表")
|
||||
@RequiresPermissions("push:detail:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PushDataReceiveDetail pushDataReceiveDetail)
|
||||
{
|
||||
public TableDataInfo list(PushDataReceiveDetail pushDataReceiveDetail) {
|
||||
startPage();
|
||||
List<PushDataReceiveDetail> list = pushDataReceiveDetailService.selectPushDataReceiveDetailList(pushDataReceiveDetail);
|
||||
return getDataTable(list);
|
||||
|
|
@ -59,8 +57,7 @@ public class PushDataReceiveDetailController extends BaseController
|
|||
@RequiresPermissions("push:detail:export")
|
||||
@SysLog(title = "推送接收明细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出推送接收明细")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PushDataReceiveDetail pushDataReceiveDetail)
|
||||
{
|
||||
public void export(HttpServletResponse response, PushDataReceiveDetail pushDataReceiveDetail) {
|
||||
List<PushDataReceiveDetail> list = pushDataReceiveDetailService.selectPushDataReceiveDetailList(pushDataReceiveDetail);
|
||||
ExcelUtil<PushDataReceiveDetail> util = new ExcelUtil<PushDataReceiveDetail>(PushDataReceiveDetail.class);
|
||||
util.exportExcel(response, list, "推送接收明细数据");
|
||||
|
|
@ -72,8 +69,7 @@ public class PushDataReceiveDetailController extends BaseController
|
|||
@ApiOperation(value = "获取推送接收明细详细信息")
|
||||
@RequiresPermissions("push:detail:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(pushDataReceiveDetailService.selectPushDataReceiveDetailById(id));
|
||||
}
|
||||
|
||||
|
|
@ -85,9 +81,12 @@ public class PushDataReceiveDetailController extends BaseController
|
|||
@RequiresPermissions("push:detail:add")
|
||||
@SysLog(title = "推送接收明细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增推送接收明细")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PushDataReceiveDetail pushDataReceiveDetail)
|
||||
{
|
||||
public AjaxResult add(@RequestBody PushDataReceiveDetail pushDataReceiveDetail) {
|
||||
try {
|
||||
return toAjax(pushDataReceiveDetailService.insertPushDataReceiveDetail(pushDataReceiveDetail));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -98,9 +97,12 @@ public class PushDataReceiveDetailController extends BaseController
|
|||
@RequiresPermissions("push:detail:edit")
|
||||
@SysLog(title = "推送接收明细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改推送接收明细")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PushDataReceiveDetail pushDataReceiveDetail)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody PushDataReceiveDetail pushDataReceiveDetail) {
|
||||
try {
|
||||
return toAjax(pushDataReceiveDetailService.updatePushDataReceiveDetail(pushDataReceiveDetail));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,8 +113,7 @@ public class PushDataReceiveDetailController extends BaseController
|
|||
@RequiresPermissions("push:detail:remove")
|
||||
@SysLog(title = "推送接收明细", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除推送接收明细")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(pushDataReceiveDetailService.deletePushDataReceiveDetailByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,13 +28,12 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
* 推送接收Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Api(tags = "推送接收接口")
|
||||
@RestController
|
||||
@RequestMapping("/push_data_receive_info")
|
||||
public class PushDataReceiveInfoController extends BaseController
|
||||
{
|
||||
public class PushDataReceiveInfoController extends BaseController {
|
||||
@Autowired
|
||||
private IPushDataReceiveInfoService pushDataReceiveInfoService;
|
||||
|
||||
|
|
@ -44,8 +43,7 @@ public class PushDataReceiveInfoController extends BaseController
|
|||
@ApiOperation(value = "查询推送接收列表")
|
||||
@RequiresPermissions("push:info:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PushDataReceiveInfo pushDataReceiveInfo)
|
||||
{
|
||||
public TableDataInfo list(PushDataReceiveInfo pushDataReceiveInfo) {
|
||||
startPage();
|
||||
List<PushDataReceiveInfo> list = pushDataReceiveInfoService.selectPushDataReceiveInfoList(pushDataReceiveInfo);
|
||||
return getDataTable(list);
|
||||
|
|
@ -59,8 +57,7 @@ public class PushDataReceiveInfoController extends BaseController
|
|||
@RequiresPermissions("push:info:export")
|
||||
@SysLog(title = "推送接收", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出推送接收")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PushDataReceiveInfo pushDataReceiveInfo)
|
||||
{
|
||||
public void export(HttpServletResponse response, PushDataReceiveInfo pushDataReceiveInfo) {
|
||||
List<PushDataReceiveInfo> list = pushDataReceiveInfoService.selectPushDataReceiveInfoList(pushDataReceiveInfo);
|
||||
ExcelUtil<PushDataReceiveInfo> util = new ExcelUtil<PushDataReceiveInfo>(PushDataReceiveInfo.class);
|
||||
util.exportExcel(response, list, "推送接收数据");
|
||||
|
|
@ -72,8 +69,7 @@ public class PushDataReceiveInfoController extends BaseController
|
|||
@ApiOperation(value = "获取推送接收详细信息")
|
||||
@RequiresPermissions("push:info:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(pushDataReceiveInfoService.selectPushDataReceiveInfoById(id));
|
||||
}
|
||||
|
||||
|
|
@ -85,9 +81,12 @@ public class PushDataReceiveInfoController extends BaseController
|
|||
@RequiresPermissions("push:info:add")
|
||||
@SysLog(title = "推送接收", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增推送接收")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PushDataReceiveInfo pushDataReceiveInfo)
|
||||
{
|
||||
public AjaxResult add(@RequestBody PushDataReceiveInfo pushDataReceiveInfo) {
|
||||
try {
|
||||
return toAjax(pushDataReceiveInfoService.insertPushDataReceiveInfo(pushDataReceiveInfo));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -98,9 +97,12 @@ public class PushDataReceiveInfoController extends BaseController
|
|||
@RequiresPermissions("push:info:edit")
|
||||
@SysLog(title = "推送接收", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改推送接收")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PushDataReceiveInfo pushDataReceiveInfo)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody PushDataReceiveInfo pushDataReceiveInfo) {
|
||||
try {
|
||||
return toAjax(pushDataReceiveInfoService.updatePushDataReceiveInfo(pushDataReceiveInfo));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,8 +113,7 @@ public class PushDataReceiveInfoController extends BaseController
|
|||
@RequiresPermissions("push:info:remove")
|
||||
@SysLog(title = "推送接收", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除推送接收")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(pushDataReceiveInfoService.deletePushDataReceiveInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,14 +13,13 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
|||
* 推送接收明细对象 push_data_receive_detail
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class PushDataReceiveDetail extends BaseEntity
|
||||
{
|
||||
public class PushDataReceiveDetail extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
|
|
|
|||
|
|
@ -12,14 +12,13 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
|||
* 推送接收对象 push_data_receive_info
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class PushDataReceiveInfo extends BaseEntity
|
||||
{
|
||||
public class PushDataReceiveInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.push.domain.PushDataReceiveDetail;
|
|||
* 推送接收明细Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface PushDataReceiveDetailMapper
|
||||
{
|
||||
public interface PushDataReceiveDetailMapper {
|
||||
/**
|
||||
* 查询推送接收明细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.push.domain.PushDataReceiveInfo;
|
|||
* 推送接收Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface PushDataReceiveInfoMapper
|
||||
{
|
||||
public interface PushDataReceiveInfoMapper {
|
||||
/**
|
||||
* 查询推送接收
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.push.domain.PushDataReceiveDetail;
|
|||
* 推送接收明细Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface IPushDataReceiveDetailService
|
||||
{
|
||||
public interface IPushDataReceiveDetailService {
|
||||
/**
|
||||
* 查询推送接收明细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,10 +7,9 @@ import com.bonus.material.push.domain.PushDataReceiveInfo;
|
|||
* 推送接收Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface IPushDataReceiveInfoService
|
||||
{
|
||||
public interface IPushDataReceiveInfoService {
|
||||
/**
|
||||
* 查询推送接收
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.material.push.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -12,11 +13,10 @@ import com.bonus.material.push.service.IPushDataReceiveDetailService;
|
|||
* 推送接收明细Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Service
|
||||
public class PushDataReceiveDetailServiceImpl implements IPushDataReceiveDetailService
|
||||
{
|
||||
public class PushDataReceiveDetailServiceImpl implements IPushDataReceiveDetailService {
|
||||
@Autowired
|
||||
private PushDataReceiveDetailMapper pushDataReceiveDetailMapper;
|
||||
|
||||
|
|
@ -27,8 +27,7 @@ public class PushDataReceiveDetailServiceImpl implements IPushDataReceiveDetailS
|
|||
* @return 推送接收明细
|
||||
*/
|
||||
@Override
|
||||
public PushDataReceiveDetail selectPushDataReceiveDetailById(Long id)
|
||||
{
|
||||
public PushDataReceiveDetail selectPushDataReceiveDetailById(Long id) {
|
||||
return pushDataReceiveDetailMapper.selectPushDataReceiveDetailById(id);
|
||||
}
|
||||
|
||||
|
|
@ -39,8 +38,7 @@ public class PushDataReceiveDetailServiceImpl implements IPushDataReceiveDetailS
|
|||
* @return 推送接收明细
|
||||
*/
|
||||
@Override
|
||||
public List<PushDataReceiveDetail> selectPushDataReceiveDetailList(PushDataReceiveDetail pushDataReceiveDetail)
|
||||
{
|
||||
public List<PushDataReceiveDetail> selectPushDataReceiveDetailList(PushDataReceiveDetail pushDataReceiveDetail) {
|
||||
return pushDataReceiveDetailMapper.selectPushDataReceiveDetailList(pushDataReceiveDetail);
|
||||
}
|
||||
|
||||
|
|
@ -51,10 +49,13 @@ public class PushDataReceiveDetailServiceImpl implements IPushDataReceiveDetailS
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPushDataReceiveDetail(PushDataReceiveDetail pushDataReceiveDetail)
|
||||
{
|
||||
public int insertPushDataReceiveDetail(PushDataReceiveDetail pushDataReceiveDetail) {
|
||||
pushDataReceiveDetail.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return pushDataReceiveDetailMapper.insertPushDataReceiveDetail(pushDataReceiveDetail);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -64,10 +65,13 @@ public class PushDataReceiveDetailServiceImpl implements IPushDataReceiveDetailS
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePushDataReceiveDetail(PushDataReceiveDetail pushDataReceiveDetail)
|
||||
{
|
||||
public int updatePushDataReceiveDetail(PushDataReceiveDetail pushDataReceiveDetail) {
|
||||
pushDataReceiveDetail.setUpdateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return pushDataReceiveDetailMapper.updatePushDataReceiveDetail(pushDataReceiveDetail);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -77,8 +81,7 @@ public class PushDataReceiveDetailServiceImpl implements IPushDataReceiveDetailS
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePushDataReceiveDetailByIds(Long[] ids)
|
||||
{
|
||||
public int deletePushDataReceiveDetailByIds(Long[] ids) {
|
||||
return pushDataReceiveDetailMapper.deletePushDataReceiveDetailByIds(ids);
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +92,7 @@ public class PushDataReceiveDetailServiceImpl implements IPushDataReceiveDetailS
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePushDataReceiveDetailById(Long id)
|
||||
{
|
||||
public int deletePushDataReceiveDetailById(Long id) {
|
||||
return pushDataReceiveDetailMapper.deletePushDataReceiveDetailById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.material.push.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -12,11 +13,10 @@ import com.bonus.material.push.service.IPushDataReceiveInfoService;
|
|||
* 推送接收Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-27
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Service
|
||||
public class PushDataReceiveInfoServiceImpl implements IPushDataReceiveInfoService
|
||||
{
|
||||
public class PushDataReceiveInfoServiceImpl implements IPushDataReceiveInfoService {
|
||||
@Autowired
|
||||
private PushDataReceiveInfoMapper pushDataReceiveInfoMapper;
|
||||
|
||||
|
|
@ -27,8 +27,7 @@ public class PushDataReceiveInfoServiceImpl implements IPushDataReceiveInfoServi
|
|||
* @return 推送接收
|
||||
*/
|
||||
@Override
|
||||
public PushDataReceiveInfo selectPushDataReceiveInfoById(Long id)
|
||||
{
|
||||
public PushDataReceiveInfo selectPushDataReceiveInfoById(Long id) {
|
||||
return pushDataReceiveInfoMapper.selectPushDataReceiveInfoById(id);
|
||||
}
|
||||
|
||||
|
|
@ -39,8 +38,7 @@ public class PushDataReceiveInfoServiceImpl implements IPushDataReceiveInfoServi
|
|||
* @return 推送接收
|
||||
*/
|
||||
@Override
|
||||
public List<PushDataReceiveInfo> selectPushDataReceiveInfoList(PushDataReceiveInfo pushDataReceiveInfo)
|
||||
{
|
||||
public List<PushDataReceiveInfo> selectPushDataReceiveInfoList(PushDataReceiveInfo pushDataReceiveInfo) {
|
||||
return pushDataReceiveInfoMapper.selectPushDataReceiveInfoList(pushDataReceiveInfo);
|
||||
}
|
||||
|
||||
|
|
@ -51,10 +49,13 @@ public class PushDataReceiveInfoServiceImpl implements IPushDataReceiveInfoServi
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPushDataReceiveInfo(PushDataReceiveInfo pushDataReceiveInfo)
|
||||
{
|
||||
public int insertPushDataReceiveInfo(PushDataReceiveInfo pushDataReceiveInfo) {
|
||||
pushDataReceiveInfo.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return pushDataReceiveInfoMapper.insertPushDataReceiveInfo(pushDataReceiveInfo);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -64,10 +65,13 @@ public class PushDataReceiveInfoServiceImpl implements IPushDataReceiveInfoServi
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePushDataReceiveInfo(PushDataReceiveInfo pushDataReceiveInfo)
|
||||
{
|
||||
public int updatePushDataReceiveInfo(PushDataReceiveInfo pushDataReceiveInfo) {
|
||||
pushDataReceiveInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return pushDataReceiveInfoMapper.updatePushDataReceiveInfo(pushDataReceiveInfo);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -77,8 +81,7 @@ public class PushDataReceiveInfoServiceImpl implements IPushDataReceiveInfoServi
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePushDataReceiveInfoByIds(Long[] ids)
|
||||
{
|
||||
public int deletePushDataReceiveInfoByIds(Long[] ids) {
|
||||
return pushDataReceiveInfoMapper.deletePushDataReceiveInfoByIds(ids);
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +92,7 @@ public class PushDataReceiveInfoServiceImpl implements IPushDataReceiveInfoServi
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePushDataReceiveInfoById(Long id)
|
||||
{
|
||||
public int deletePushDataReceiveInfoById(Long id) {
|
||||
return pushDataReceiveInfoMapper.deletePushDataReceiveInfoById(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue