修改刷卡记录和设备操作日志接口权限;在刷卡记录中添加userName字段

This commit is contained in:
2024-12-30 17:11:02 +08:00
parent ca1fd4a3d8
commit c783cfb492
4 changed files with 13 additions and 14 deletions

View File

@ -41,7 +41,7 @@ public class NgCardSwipeRecordsController extends BaseController
/** /**
* 用户查询刷卡记录列表 * 用户查询刷卡记录列表
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:list')")
@GetMapping("/list/user") @GetMapping("/list/user")
@ApiOperation("查询刷卡记录列表") @ApiOperation("查询刷卡记录列表")
public TableDataInfo userList(NgCardSwipeRecords ngCardSwipeRecords) public TableDataInfo userList(NgCardSwipeRecords ngCardSwipeRecords)
@ -54,7 +54,6 @@ public class NgCardSwipeRecordsController extends BaseController
/** /**
* 查询刷卡记录列表 * 查询刷卡记录列表
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:list')")
@GetMapping("/list") @GetMapping("/list")
@ApiOperation("查询刷卡记录列表") @ApiOperation("查询刷卡记录列表")
public TableDataInfo list(NgCardSwipeRecords ngCardSwipeRecords) public TableDataInfo list(NgCardSwipeRecords ngCardSwipeRecords)
@ -69,7 +68,6 @@ public class NgCardSwipeRecordsController extends BaseController
* 导出刷卡记录列表 * 导出刷卡记录列表
*/ */
@ApiOperation("导出刷卡记录列表") @ApiOperation("导出刷卡记录列表")
@PreAuthorize("@ss.hasPermi('iot:records:export')")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, NgCardSwipeRecords ngCardSwipeRecords) public void export(HttpServletResponse response, NgCardSwipeRecords ngCardSwipeRecords)
{ {
@ -81,7 +79,6 @@ public class NgCardSwipeRecordsController extends BaseController
/** /**
* 获取刷卡记录详细信息 * 获取刷卡记录详细信息
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
@ApiOperation("获取刷卡记录详细信息") @ApiOperation("获取刷卡记录详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
@ -92,7 +89,6 @@ public class NgCardSwipeRecordsController extends BaseController
/** /**
* 新增刷卡记录 * 新增刷卡记录
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:add')")
@PostMapping @PostMapping
@ApiOperation("新增刷卡记录") @ApiOperation("新增刷卡记录")
public AjaxResult add(@RequestBody NgCardSwipeRecords ngCardSwipeRecords) public AjaxResult add(@RequestBody NgCardSwipeRecords ngCardSwipeRecords)
@ -103,7 +99,6 @@ public class NgCardSwipeRecordsController extends BaseController
/** /**
* 修改刷卡记录 * 修改刷卡记录
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:edit')")
@PutMapping @PutMapping
@ApiOperation("修改刷卡记录") @ApiOperation("修改刷卡记录")
public AjaxResult edit(@RequestBody NgCardSwipeRecords ngCardSwipeRecords) public AjaxResult edit(@RequestBody NgCardSwipeRecords ngCardSwipeRecords)
@ -114,7 +109,6 @@ public class NgCardSwipeRecordsController extends BaseController
/** /**
* 删除刷卡记录 * 删除刷卡记录
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:remove')")
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation("删除刷卡记录") @ApiOperation("删除刷卡记录")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)

View File

@ -41,7 +41,6 @@ public class NgDeviceOperationRecordsController extends BaseController
/** /**
* 查询设备操作记录列表 * 查询设备操作记录列表
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:list')")
@GetMapping("/list") @GetMapping("/list")
@ApiOperation("查询设备操作记录列表") @ApiOperation("查询设备操作记录列表")
public TableDataInfo list(NgDeviceOperationRecords ngDeviceOperationRecords) public TableDataInfo list(NgDeviceOperationRecords ngDeviceOperationRecords)
@ -55,7 +54,6 @@ public class NgDeviceOperationRecordsController extends BaseController
* 导出设备操作记录列表 * 导出设备操作记录列表
*/ */
@ApiOperation("导出设备操作记录列表") @ApiOperation("导出设备操作记录列表")
@PreAuthorize("@ss.hasPermi('iot:records:export')")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, NgDeviceOperationRecords ngDeviceOperationRecords) public void export(HttpServletResponse response, NgDeviceOperationRecords ngDeviceOperationRecords)
{ {
@ -67,7 +65,6 @@ public class NgDeviceOperationRecordsController extends BaseController
/** /**
* 获取设备操作记录详细信息 * 获取设备操作记录详细信息
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
@ApiOperation("获取设备操作记录详细信息") @ApiOperation("获取设备操作记录详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
@ -78,7 +75,6 @@ public class NgDeviceOperationRecordsController extends BaseController
/** /**
* 新增设备操作记录 * 新增设备操作记录
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:add')")
@PostMapping @PostMapping
@ApiOperation("新增设备操作记录") @ApiOperation("新增设备操作记录")
public AjaxResult add(@RequestBody NgDeviceOperationRecords ngDeviceOperationRecords) public AjaxResult add(@RequestBody NgDeviceOperationRecords ngDeviceOperationRecords)
@ -89,7 +85,6 @@ public class NgDeviceOperationRecordsController extends BaseController
/** /**
* 修改设备操作记录 * 修改设备操作记录
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:edit')")
@PutMapping @PutMapping
@ApiOperation("修改设备操作记录") @ApiOperation("修改设备操作记录")
public AjaxResult edit(@RequestBody NgDeviceOperationRecords ngDeviceOperationRecords) public AjaxResult edit(@RequestBody NgDeviceOperationRecords ngDeviceOperationRecords)
@ -100,7 +95,6 @@ public class NgDeviceOperationRecordsController extends BaseController
/** /**
* 删除设备操作记录 * 删除设备操作记录
*/ */
@PreAuthorize("@ss.hasPermi('iot:records:remove')")
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation("删除设备操作记录") @ApiOperation("删除设备操作记录")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)

View File

@ -69,4 +69,9 @@ public class NgCardSwipeRecords extends BaseEntity
@ApiModelProperty("区域码") @ApiModelProperty("区域码")
private String areaCode; private String areaCode;
/** 用户名称 */
@Excel(name = "用户名称")
@ApiModelProperty("用户名称")
private String userName;
} }

View File

@ -19,10 +19,11 @@
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="userName" column="user_name" />
</resultMap> </resultMap>
<sql id="selectNgCardSwipeRecordsVo"> <sql id="selectNgCardSwipeRecordsVo">
select id, user_id, device_number, card_swipe_type, card_number, dept_id, card_swipe_time, amount_due, area_code, remark, create_time, update_time, create_by, update_by from ng_card_swipe_records select id, user_id, device_number, card_swipe_type, card_number, dept_id, card_swipe_time, amount_due, area_code, remark, create_time, update_time, create_by, update_by, user_name from ng_card_swipe_records
</sql> </sql>
<select id="selectNgCardSwipeRecordsList" parameterType="NgCardSwipeRecords" resultMap="NgCardSwipeRecordsResult"> <select id="selectNgCardSwipeRecordsList" parameterType="NgCardSwipeRecords" resultMap="NgCardSwipeRecordsResult">
@ -36,6 +37,7 @@
<if test="cardSwipeTime != null "> and card_swipe_time = #{cardSwipeTime}</if> <if test="cardSwipeTime != null "> and card_swipe_time = #{cardSwipeTime}</if>
<if test="amountDue != null "> and amount_due = #{amountDue}</if> <if test="amountDue != null "> and amount_due = #{amountDue}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if> <if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
</where> </where>
</select> </select>
@ -50,6 +52,7 @@
<if test="cardSwipeTime != null "> and card_swipe_time = #{cardSwipeTime}</if> <if test="cardSwipeTime != null "> and card_swipe_time = #{cardSwipeTime}</if>
<if test="amountDue != null "> and amount_due = #{amountDue}</if> <if test="amountDue != null "> and amount_due = #{amountDue}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if> <if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
</where> </where>
</select> </select>
@ -74,6 +77,7 @@
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="userName != null">user_name,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if> <if test="userId != null">#{userId},</if>
@ -89,6 +93,7 @@
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="userName != null">#{userName},</if>
</trim> </trim>
</insert> </insert>
@ -108,6 +113,7 @@
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="userName != null">user_name = #{userName},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>