|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.flossom.common.core.domain.R;
|
|
|
|
import com.flossom.common.core.domain.entity.WxUserIntegralLog;
|
|
|
|
import com.flossom.common.core.domain.entity.WxUserIntegralLog;
|
|
|
|
import com.flossom.common.core.utils.poi.ExcelUtil;
|
|
|
|
import com.flossom.common.core.utils.poi.ExcelUtil;
|
|
|
|
import com.flossom.common.core.web.controller.BaseController;
|
|
|
|
import com.flossom.common.core.web.controller.BaseController;
|
|
|
|
@ -13,14 +14,7 @@ import com.flossom.common.log.annotation.Log;
|
|
|
|
import com.flossom.common.log.enums.BusinessType;
|
|
|
|
import com.flossom.common.log.enums.BusinessType;
|
|
|
|
import com.flossom.common.security.annotation.RequiresPermissions;
|
|
|
|
import com.flossom.common.security.annotation.RequiresPermissions;
|
|
|
|
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.PutMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import com.flossom.system.service.IWxUserIntegralLogService;
|
|
|
|
import com.flossom.system.service.IWxUserIntegralLogService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -31,8 +25,7 @@ import com.flossom.system.service.IWxUserIntegralLogService;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/integralLog")
|
|
|
|
@RequestMapping("/integralLog")
|
|
|
|
public class WxUserIntegralLogController extends BaseController
|
|
|
|
public class WxUserIntegralLogController extends BaseController {
|
|
|
|
{
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IWxUserIntegralLogService wxUserIntegralLogService;
|
|
|
|
private IWxUserIntegralLogService wxUserIntegralLogService;
|
|
|
|
|
|
|
|
|
|
|
|
@ -41,8 +34,7 @@ public class WxUserIntegralLogController extends BaseController
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("system:integralLog:list")
|
|
|
|
@RequiresPermissions("system:integralLog:list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
public TableDataInfo list(WxUserIntegralLog wxUserIntegralLog)
|
|
|
|
public TableDataInfo list(WxUserIntegralLog wxUserIntegralLog) {
|
|
|
|
{
|
|
|
|
|
|
|
|
startPage();
|
|
|
|
startPage();
|
|
|
|
List<WxUserIntegralLog> list = wxUserIntegralLogService.selectWxUserIntegralLogList(wxUserIntegralLog);
|
|
|
|
List<WxUserIntegralLog> list = wxUserIntegralLogService.selectWxUserIntegralLogList(wxUserIntegralLog);
|
|
|
|
return getDataTable(list);
|
|
|
|
return getDataTable(list);
|
|
|
|
@ -54,8 +46,7 @@ public class WxUserIntegralLogController extends BaseController
|
|
|
|
@RequiresPermissions("system:integralLog:export")
|
|
|
|
@RequiresPermissions("system:integralLog:export")
|
|
|
|
@Log(title = "微信用户积分流水", businessType = BusinessType.EXPORT)
|
|
|
|
@Log(title = "微信用户积分流水", businessType = BusinessType.EXPORT)
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, WxUserIntegralLog wxUserIntegralLog)
|
|
|
|
public void export(HttpServletResponse response, WxUserIntegralLog wxUserIntegralLog) {
|
|
|
|
{
|
|
|
|
|
|
|
|
List<WxUserIntegralLog> list = wxUserIntegralLogService.selectWxUserIntegralLogList(wxUserIntegralLog);
|
|
|
|
List<WxUserIntegralLog> list = wxUserIntegralLogService.selectWxUserIntegralLogList(wxUserIntegralLog);
|
|
|
|
ExcelUtil<WxUserIntegralLog> util = new ExcelUtil<WxUserIntegralLog>(WxUserIntegralLog.class);
|
|
|
|
ExcelUtil<WxUserIntegralLog> util = new ExcelUtil<WxUserIntegralLog>(WxUserIntegralLog.class);
|
|
|
|
util.exportExcel(response, list, "微信用户积分流水数据");
|
|
|
|
util.exportExcel(response, list, "微信用户积分流水数据");
|
|
|
|
@ -66,8 +57,7 @@ public class WxUserIntegralLogController extends BaseController
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("system:integralLog:query")
|
|
|
|
@RequiresPermissions("system:integralLog:query")
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
|
@GetMapping(value = "/{id}")
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return success(wxUserIntegralLogService.selectWxUserIntegralLogById(id));
|
|
|
|
return success(wxUserIntegralLogService.selectWxUserIntegralLogById(id));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -77,8 +67,7 @@ public class WxUserIntegralLogController extends BaseController
|
|
|
|
@RequiresPermissions("system:integralLog:add")
|
|
|
|
@RequiresPermissions("system:integralLog:add")
|
|
|
|
@Log(title = "微信用户积分流水", businessType = BusinessType.INSERT)
|
|
|
|
@Log(title = "微信用户积分流水", businessType = BusinessType.INSERT)
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody WxUserIntegralLog wxUserIntegralLog)
|
|
|
|
public AjaxResult add(@RequestBody WxUserIntegralLog wxUserIntegralLog) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(wxUserIntegralLogService.insertWxUserIntegralLog(wxUserIntegralLog));
|
|
|
|
return toAjax(wxUserIntegralLogService.insertWxUserIntegralLog(wxUserIntegralLog));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -88,8 +77,7 @@ public class WxUserIntegralLogController extends BaseController
|
|
|
|
@RequiresPermissions("system:integralLog:edit")
|
|
|
|
@RequiresPermissions("system:integralLog:edit")
|
|
|
|
@Log(title = "微信用户积分流水", businessType = BusinessType.UPDATE)
|
|
|
|
@Log(title = "微信用户积分流水", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@RequestBody WxUserIntegralLog wxUserIntegralLog)
|
|
|
|
public AjaxResult edit(@RequestBody WxUserIntegralLog wxUserIntegralLog) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(wxUserIntegralLogService.updateWxUserIntegralLog(wxUserIntegralLog));
|
|
|
|
return toAjax(wxUserIntegralLogService.updateWxUserIntegralLog(wxUserIntegralLog));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -98,9 +86,17 @@ public class WxUserIntegralLogController extends BaseController
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("system:integralLog:remove")
|
|
|
|
@RequiresPermissions("system:integralLog:remove")
|
|
|
|
@Log(title = "微信用户积分流水", businessType = BusinessType.DELETE)
|
|
|
|
@Log(title = "微信用户积分流水", businessType = BusinessType.DELETE)
|
|
|
|
@DeleteMapping("/{ids}")
|
|
|
|
@DeleteMapping("/{ids}")
|
|
|
|
public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(wxUserIntegralLogService.deleteWxUserIntegralLogByIds(ids));
|
|
|
|
return toAjax(wxUserIntegralLogService.deleteWxUserIntegralLogByIds(ids));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 计算所有用户得过期积分
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@GetMapping("/countUserExpireIntegral")
|
|
|
|
|
|
|
|
public R countUserExpireIntegral(@RequestParam(required = false, value = "idList") List<Long> idList) {
|
|
|
|
|
|
|
|
wxUserIntegralLogService.countUserExpireIntegral(idList);
|
|
|
|
|
|
|
|
return R.ok();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|