| 
					
				 | 
			
			
				@@ -0,0 +1,103 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+package com.yijia.integral.controller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.security.access.prepost.PreAuthorize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.web.bind.annotation.GetMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+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.yijia.common.annotation.Log; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yijia.common.core.controller.BaseController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yijia.common.core.domain.AjaxResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yijia.common.enums.BusinessType; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yijia.integral.domain.CustomerPointsRecord; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yijia.integral.service.ICustomerPointsRecordService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yijia.common.utils.poi.ExcelUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yijia.common.core.page.TableDataInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * 客户积分记录Controller 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ *  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @author yijia 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @date 2021-03-17 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@RestController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@RequestMapping("/integral/record") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+public class CustomerPointsRecordController extends BaseController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private ICustomerPointsRecordService customerPointsRecordService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 查询客户积分记录列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PreAuthorize("@ss.hasPermi('integral:record:list')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @GetMapping("/list") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public TableDataInfo list(CustomerPointsRecord customerPointsRecord) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        startPage(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<CustomerPointsRecord> list = customerPointsRecordService.selectCustomerPointsRecordList(customerPointsRecord); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return getDataTable(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 导出客户积分记录列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PreAuthorize("@ss.hasPermi('integral:record:export')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "客户积分记录", businessType = BusinessType.EXPORT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @GetMapping("/export") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxResult export(CustomerPointsRecord customerPointsRecord) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<CustomerPointsRecord> list = customerPointsRecordService.selectCustomerPointsRecordList(customerPointsRecord); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ExcelUtil<CustomerPointsRecord> util = new ExcelUtil<CustomerPointsRecord>(CustomerPointsRecord.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return util.exportExcel(list, "record"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 获取客户积分记录详细信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PreAuthorize("@ss.hasPermi('integral:record:query')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @GetMapping(value = "/{id}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxResult getInfo(@PathVariable("id") Long id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return AjaxResult.success(customerPointsRecordService.selectCustomerPointsRecordById(id)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 新增客户积分记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PreAuthorize("@ss.hasPermi('integral:record:add')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "客户积分记录", businessType = BusinessType.INSERT) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PostMapping 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxResult add(@RequestBody CustomerPointsRecord customerPointsRecord) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return toAjax(customerPointsRecordService.insertCustomerPointsRecord(customerPointsRecord)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 修改客户积分记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PreAuthorize("@ss.hasPermi('integral:record:edit')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "客户积分记录", businessType = BusinessType.UPDATE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PutMapping 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxResult edit(@RequestBody CustomerPointsRecord customerPointsRecord) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return toAjax(customerPointsRecordService.updateCustomerPointsRecord(customerPointsRecord)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 删除客户积分记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PreAuthorize("@ss.hasPermi('integral:record:remove')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Log(title = "客户积分记录", businessType = BusinessType.DELETE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	@DeleteMapping("/{ids}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxResult remove(@PathVariable Long[] ids) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return toAjax(customerPointsRecordService.deleteCustomerPointsRecordByIds(ids)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 |