Commit 2743af0e by leejoker

Merge remote-tracking branch 'origin/back_end_dev' into back_end_dev

2 parents cb1d4eb5 f2c8acf9
...@@ -63,7 +63,7 @@ public class WeTaskFissionController extends BaseController { ...@@ -63,7 +63,7 @@ public class WeTaskFissionController extends BaseController {
@ApiOperation(value = "查询任务宝列表", httpMethod = "GET") @ApiOperation(value = "查询任务宝列表", httpMethod = "GET")
@PreAuthorize("@ss.hasPermi('wecom:fission:list')") @PreAuthorize("@ss.hasPermi('wecom:fission:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(WeTaskFission weTaskFission) { public TableDataInfo<List<WeTaskFission>> list(WeTaskFission weTaskFission) {
startPage(); startPage();
List<WeTaskFission> list = weTaskFissionService.selectWeTaskFissionList(weTaskFission); List<WeTaskFission> list = weTaskFissionService.selectWeTaskFissionList(weTaskFission);
return getDataTable(list); return getDataTable(list);
...@@ -75,7 +75,7 @@ public class WeTaskFissionController extends BaseController { ...@@ -75,7 +75,7 @@ public class WeTaskFissionController extends BaseController {
@ApiOperation(value = "查询统计信息", httpMethod = "GET") @ApiOperation(value = "查询统计信息", httpMethod = "GET")
@PreAuthorize("@ss.hasPermi('wecom:fission:stat')") @PreAuthorize("@ss.hasPermi('wecom:fission:stat')")
@GetMapping("/stat") @GetMapping("/stat")
public AjaxResult statistics(WeTaskFissionStatisticQO weTaskFissionStatisticQO) throws ParseException { public AjaxResult<WeTaskFissionStatisticVO> statistics(WeTaskFissionStatisticQO weTaskFissionStatisticQO) throws ParseException {
Date st; Date st;
Date et = DateUtils.getNowDate(); Date et = DateUtils.getNowDate();
if (weTaskFissionStatisticQO.getSeven()) { if (weTaskFissionStatisticQO.getSeven()) {
...@@ -112,7 +112,7 @@ public class WeTaskFissionController extends BaseController { ...@@ -112,7 +112,7 @@ public class WeTaskFissionController extends BaseController {
@ApiOperation(value = "获取任务宝详细信息", httpMethod = "GET") @ApiOperation(value = "获取任务宝详细信息", httpMethod = "GET")
@PreAuthorize("@ss.hasPermi('wecom:fission:query')") @PreAuthorize("@ss.hasPermi('wecom:fission:query')")
@GetMapping(value = "/getInfo/{id}") @GetMapping(value = "/getInfo/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult<WeTaskFission> getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(weTaskFissionService.selectWeTaskFissionById(id)); return AjaxResult.success(weTaskFissionService.selectWeTaskFissionById(id));
} }
...@@ -195,7 +195,7 @@ public class WeTaskFissionController extends BaseController { ...@@ -195,7 +195,7 @@ public class WeTaskFissionController extends BaseController {
return AjaxResult.error(HttpStatus.NOT_FOUND, "数据不存在"); return AjaxResult.error(HttpStatus.NOT_FOUND, "数据不存在");
} }
weTaskFissionService.completeFissionRecord(id, recordId, weChatUserDTO); weTaskFissionService.completeFissionRecord(id, recordId, weChatUserDTO);
return AjaxResult.success(taskFission.getFissQrcode()); return AjaxResult.success("操作成功",taskFission.getFissQrcode());
} }
/** /**
...@@ -205,7 +205,7 @@ public class WeTaskFissionController extends BaseController { ...@@ -205,7 +205,7 @@ public class WeTaskFissionController extends BaseController {
@PreAuthorize("@ss.hasPermi('wecom:fission:poster')") @PreAuthorize("@ss.hasPermi('wecom:fission:poster')")
@Log(title = "生成带二维码的海报", businessType = BusinessType.OTHER) @Log(title = "生成带二维码的海报", businessType = BusinessType.OTHER)
@PostMapping("/poster") @PostMapping("/poster")
public AjaxResult posterGenerate(@RequestBody WeTaskFissionPosterDTO weTaskFissionPosterDTO) { public AjaxResult<JSONObject> posterGenerate(@RequestBody WeTaskFissionPosterDTO weTaskFissionPosterDTO) {
String posterUrl = weTaskFissionService.fissionPosterGenerate(weTaskFissionPosterDTO); String posterUrl = weTaskFissionService.fissionPosterGenerate(weTaskFissionPosterDTO);
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("posterUrl", posterUrl); json.put("posterUrl", posterUrl);
...@@ -219,7 +219,7 @@ public class WeTaskFissionController extends BaseController { ...@@ -219,7 +219,7 @@ public class WeTaskFissionController extends BaseController {
@Log(title = "上传兑奖图片", businessType = BusinessType.OTHER) @Log(title = "上传兑奖图片", businessType = BusinessType.OTHER)
@PostMapping("/upload") @PostMapping("/upload")
@ApiOperation(value = "上传兑奖图片", httpMethod = "POST") @ApiOperation(value = "上传兑奖图片", httpMethod = "POST")
public AjaxResult upload(@RequestParam(value = "file") MultipartFile file) throws IOException { public AjaxResult<JSONObject> upload(@RequestParam(value = "file") MultipartFile file) throws IOException {
String url = FileUploadUtils.upload2Cos(file, cosConfig); String url = FileUploadUtils.upload2Cos(file, cosConfig);
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("rewardImageUrl", url); json.put("rewardImageUrl", url);
......
...@@ -64,7 +64,7 @@ public class BaseController ...@@ -64,7 +64,7 @@ public class BaseController
* 响应请求分页数据 * 响应请求分页数据
*/ */
@SuppressWarnings({ "rawtypes", "unchecked" }) @SuppressWarnings({ "rawtypes", "unchecked" })
protected TableDataInfo getDataTable(List<?> list) protected <T>TableDataInfo getDataTable(List<T> list)
{ {
TableDataInfo rspData = new TableDataInfo(); TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS); rspData.setCode(HttpStatus.SUCCESS);
...@@ -78,7 +78,7 @@ public class BaseController ...@@ -78,7 +78,7 @@ public class BaseController
* 响应请求分页数据 * 响应请求分页数据
*/ */
@SuppressWarnings({ "rawtypes", "unchecked" }) @SuppressWarnings({ "rawtypes", "unchecked" })
protected TableDataInfo getDataTable(PageInfo<?> pageInfo) protected <T>TableDataInfo getDataTable(PageInfo<T> pageInfo)
{ {
TableDataInfo rspData = new TableDataInfo(); TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS); rspData.setCode(HttpStatus.SUCCESS);
......
...@@ -227,18 +227,14 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto ...@@ -227,18 +227,14 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
}); });
List<WeFlowerCustomerRel> weFlowerCustomerRels = iWeFlowerCustomerRelService.list(new LambdaQueryWrapper<WeFlowerCustomerRel>() List<WeFlowerCustomerRel> weFlowerCustomerRels = iWeFlowerCustomerRelService.list(new LambdaQueryWrapper<WeFlowerCustomerRel>()
.eq(WeFlowerCustomerRel::getExternalUserid, weCustomer.getExternalUserid())); .eq(WeFlowerCustomerRel::getExternalUserid, weCustomer.getExternalUserid())
.eq(WeFlowerCustomerRel::getUserId,userId));
if (CollectionUtil.isNotEmpty(weFlowerCustomerRels)) { if (CollectionUtil.isNotEmpty(weFlowerCustomerRels)) {
List<Long> weFlowerCustomerRelIds = weFlowerCustomerRels.stream().map(WeFlowerCustomerRel::getId).collect(Collectors.toList()); List<Long> weFlowerCustomerRelIds = weFlowerCustomerRels.stream().map(WeFlowerCustomerRel::getId).collect(Collectors.toList());
iWeFlowerCustomerTagRelService.remove( iWeFlowerCustomerTagRelService.remove(new LambdaQueryWrapper<WeFlowerCustomerTagRel>()
new LambdaQueryWrapper<WeFlowerCustomerTagRel>().in(WeFlowerCustomerTagRel::getFlowerCustomerRelId, .in(WeFlowerCustomerTagRel::getFlowerCustomerRelId, weFlowerCustomerRelIds));
weFlowerCustomerRelIds) iWeFlowerCustomerRelService.removeByIds(weFlowerCustomerRelIds);
);
iWeFlowerCustomerRelService.removeByIds(
weFlowerCustomerRelIds
);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!