|
@@ -6,6 +6,9 @@ import beilv.common.core.domain.AjaxResult;
|
|
|
import beilv.common.core.page.TableDataInfo;
|
|
|
import beilv.common.enums.BusinessType;
|
|
|
import beilv.common.utils.poi.ExcelUtil;
|
|
|
+import beilv.system.domain.SysMember;
|
|
|
+import beilv.system.domain.dto.SysMemberDTO;
|
|
|
+import beilv.system.service.ISysMemberService;
|
|
|
import beilv.userbill.domain.SysUserBill;
|
|
|
import beilv.userbill.service.ISysUserBillService;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
@@ -14,6 +17,7 @@ import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -30,6 +34,8 @@ public class SysUserBillController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private ISysUserBillService sysUserBillService;
|
|
|
+ @Autowired
|
|
|
+ private ISysMemberService sysMemberService;
|
|
|
|
|
|
@RequiresPermissions("system:bill:view")
|
|
|
@GetMapping()
|
|
@@ -108,4 +114,25 @@ public class SysUserBillController extends BaseController {
|
|
|
return toAjax(sysUserBillService.deleteSysUserBillByIds(ids));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 用户积分兑换商品
|
|
|
+ */
|
|
|
+ @GetMapping("/exchange/{id}")
|
|
|
+ public String exchange(@PathVariable("id") Long id, ModelMap mmap) {
|
|
|
+ SysMemberDTO sysMemberDTO = new SysMemberDTO();
|
|
|
+ sysMemberDTO.setId(id);
|
|
|
+ mmap.put("sysMemberDTO", sysMemberDTO);
|
|
|
+ return prefix + "/exchange";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 用户积分兑换商品
|
|
|
+ */
|
|
|
+ @Log(title = "用户积分兑换商品", businessType = BusinessType.OTHER)
|
|
|
+ @PostMapping("/exchange")
|
|
|
+ @ResponseBody
|
|
|
+ public AjaxResult exchangeSave(SysMemberDTO dto) {
|
|
|
+ return toAjax(sysUserBillService.exchange(dto));
|
|
|
+ }
|
|
|
}
|