38 changed files with 5001 additions and 390 deletions
-
104chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuExperienceShareController.java
-
128chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysAnswerAgainController.java
-
101chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysAnswersController.java
-
104chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysMuhuUserController.java
-
32chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysQuestionsController.java
-
433chenhai-system/src/main/java/com/chenhai/muhu/domain/MuhuExperienceShare.java
-
61chenhai-system/src/main/java/com/chenhai/muhu/mapper/MuhuExperienceShareMapper.java
-
61chenhai-system/src/main/java/com/chenhai/muhu/service/IMuhuExperienceShareService.java
-
93chenhai-system/src/main/java/com/chenhai/muhu/service/impl/MuhuExperienceShareServiceImpl.java
-
155chenhai-system/src/main/java/com/chenhai/system/domain/SysAnswerAgain.java
-
169chenhai-system/src/main/java/com/chenhai/system/domain/SysAnswers.java
-
222chenhai-system/src/main/java/com/chenhai/system/domain/SysMuhuUser.java
-
40chenhai-system/src/main/java/com/chenhai/system/domain/SysQuestions.java
-
61chenhai-system/src/main/java/com/chenhai/system/mapper/SysAnswerAgainMapper.java
-
51chenhai-system/src/main/java/com/chenhai/system/mapper/SysAnswersMapper.java
-
61chenhai-system/src/main/java/com/chenhai/system/mapper/SysMuhuUserMapper.java
-
61chenhai-system/src/main/java/com/chenhai/system/service/ISysAnswerAgainService.java
-
57chenhai-system/src/main/java/com/chenhai/system/service/ISysAnswersService.java
-
61chenhai-system/src/main/java/com/chenhai/system/service/ISysMuhuUserService.java
-
121chenhai-system/src/main/java/com/chenhai/system/service/impl/SysAnswerAgainServiceImpl.java
-
370chenhai-system/src/main/java/com/chenhai/system/service/impl/SysAnswersServiceImpl.java
-
95chenhai-system/src/main/java/com/chenhai/system/service/impl/SysMuhuUserServiceImpl.java
-
36chenhai-system/src/main/java/com/chenhai/system/service/impl/SysQuestionsServiceImpl.java
-
181chenhai-system/src/main/resources/mapper/muhu/MuhuExperienceShareMapper.xml
-
94chenhai-system/src/main/resources/mapper/system/SysAnswerAgainMapper.xml
-
96chenhai-system/src/main/resources/mapper/system/SysAnswersMapper.xml
-
117chenhai-system/src/main/resources/mapper/system/SysMuhuUserMapper.xml
-
22chenhai-system/src/main/resources/mapper/system/SysQuestionsMapper.xml
-
44chenhai-ui/src/api/muhu/share.js
-
44chenhai-ui/src/api/system/again.js
-
61chenhai-ui/src/api/system/answers.js
-
44chenhai-ui/src/api/system/muhuuser.js
-
66chenhai-ui/src/router/index.js
-
440chenhai-ui/src/views/muhu/share/index.vue
-
275chenhai-ui/src/views/system/again/index.vue
-
621chenhai-ui/src/views/system/answers/index.vue
-
323chenhai-ui/src/views/system/muhuuser/index.vue
-
260chenhai-ui/src/views/system/questions/index.vue
@ -0,0 +1,104 @@ |
|||||
|
package com.chenhai.web.controller.muhu; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||
|
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.chenhai.common.annotation.Log; |
||||
|
import com.chenhai.common.core.controller.BaseController; |
||||
|
import com.chenhai.common.core.domain.AjaxResult; |
||||
|
import com.chenhai.common.enums.BusinessType; |
||||
|
import com.chenhai.muhu.domain.MuhuExperienceShare; |
||||
|
import com.chenhai.muhu.service.IMuhuExperienceShareService; |
||||
|
import com.chenhai.common.utils.poi.ExcelUtil; |
||||
|
import com.chenhai.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 经验分享Controller |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-30 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/muhu/share") |
||||
|
public class MuhuExperienceShareController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private IMuhuExperienceShareService muhuExperienceShareService; |
||||
|
|
||||
|
/** |
||||
|
* 查询经验分享列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('muhu:share:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(MuhuExperienceShare muhuExperienceShare) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<MuhuExperienceShare> list = muhuExperienceShareService.selectMuhuExperienceShareList(muhuExperienceShare); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出经验分享列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('muhu:share:export')") |
||||
|
@Log(title = "经验分享", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, MuhuExperienceShare muhuExperienceShare) |
||||
|
{ |
||||
|
List<MuhuExperienceShare> list = muhuExperienceShareService.selectMuhuExperienceShareList(muhuExperienceShare); |
||||
|
ExcelUtil<MuhuExperienceShare> util = new ExcelUtil<MuhuExperienceShare>(MuhuExperienceShare.class); |
||||
|
util.exportExcel(response, list, "经验分享数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取经验分享详细信息 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('muhu:share:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
return success(muhuExperienceShareService.selectMuhuExperienceShareById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增经验分享 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('muhu:share:add')") |
||||
|
@Log(title = "经验分享", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody MuhuExperienceShare muhuExperienceShare) |
||||
|
{ |
||||
|
return toAjax(muhuExperienceShareService.insertMuhuExperienceShare(muhuExperienceShare)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改经验分享 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('muhu:share:edit')") |
||||
|
@Log(title = "经验分享", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody MuhuExperienceShare muhuExperienceShare) |
||||
|
{ |
||||
|
return toAjax(muhuExperienceShareService.updateMuhuExperienceShare(muhuExperienceShare)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除经验分享 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('muhu:share:remove')") |
||||
|
@Log(title = "经验分享", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||
|
{ |
||||
|
return toAjax(muhuExperienceShareService.deleteMuhuExperienceShareByIds(ids)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,128 @@ |
|||||
|
package com.chenhai.web.controller.system; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||
|
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.chenhai.common.annotation.Log; |
||||
|
import com.chenhai.common.core.controller.BaseController; |
||||
|
import com.chenhai.common.core.domain.AjaxResult; |
||||
|
import com.chenhai.common.enums.BusinessType; |
||||
|
import com.chenhai.common.utils.SecurityUtils; |
||||
|
import com.chenhai.system.domain.SysAnswerAgain; |
||||
|
import com.chenhai.system.service.ISysAnswerAgainService; |
||||
|
import com.chenhai.common.utils.poi.ExcelUtil; |
||||
|
import com.chenhai.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 回复Controller |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-02 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/system/again") |
||||
|
public class SysAnswerAgainController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private ISysAnswerAgainService sysAnswerAgainService; |
||||
|
|
||||
|
/** |
||||
|
* 查询回复列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:again:list') or @ss.hasRole('muhu')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(SysAnswerAgain sysAnswerAgain) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<SysAnswerAgain> list = sysAnswerAgainService.selectSysAnswerAgainList(sysAnswerAgain); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出回复列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:again:export') or @ss.hasRole('muhu')") |
||||
|
@Log(title = "回复", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, SysAnswerAgain sysAnswerAgain) |
||||
|
{ |
||||
|
List<SysAnswerAgain> list = sysAnswerAgainService.selectSysAnswerAgainList(sysAnswerAgain); |
||||
|
ExcelUtil<SysAnswerAgain> util = new ExcelUtil<SysAnswerAgain>(SysAnswerAgain.class); |
||||
|
util.exportExcel(response, list, "回复数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取回复详细信息 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:again:query') or @ss.hasRole('muhu')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
return success(sysAnswerAgainService.selectSysAnswerAgainById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增回复 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:again:add') or @ss.hasRole('muhu')") |
||||
|
@Log(title = "回复", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody SysAnswerAgain sysAnswerAgain) |
||||
|
{ |
||||
|
// 可以在这里验证 answerId 是否为空 |
||||
|
if (sysAnswerAgain.getAnswerId() == null) { |
||||
|
return error("对应的回复ID不能为空"); |
||||
|
} |
||||
|
|
||||
|
return toAjax(sysAnswerAgainService.insertSysAnswerAgain(sysAnswerAgain)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改回复 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:again:edit') or @ss.hasRole('muhu')") |
||||
|
@Log(title = "回复", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody SysAnswerAgain sysAnswerAgain) |
||||
|
{ |
||||
|
// 验证权限:只能修改自己的回复 |
||||
|
SysAnswerAgain existing = sysAnswerAgainService.selectSysAnswerAgainById(sysAnswerAgain.getId()); |
||||
|
if (existing != null) { |
||||
|
Long currentUserId = SecurityUtils.getUserId(); |
||||
|
if (!existing.getUserId().equals(currentUserId.toString())) { |
||||
|
return error("只能修改自己的回复"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return toAjax(sysAnswerAgainService.updateSysAnswerAgain(sysAnswerAgain)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除回复 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:again:remove') or @ss.hasRole('muhu')") |
||||
|
@Log(title = "回复", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||
|
{ |
||||
|
// 验证权限:只能删除自己的回复 |
||||
|
Long currentUserId = SecurityUtils.getUserId(); |
||||
|
for (Long id : ids) { |
||||
|
SysAnswerAgain existing = sysAnswerAgainService.selectSysAnswerAgainById(id); |
||||
|
if (existing != null && !existing.getUserId().equals(currentUserId.toString())) { |
||||
|
return error("只能删除自己的回复"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return toAjax(sysAnswerAgainService.deleteSysAnswerAgainByIds(ids)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,104 @@ |
|||||
|
package com.chenhai.web.controller.system; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||
|
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.chenhai.common.annotation.Log; |
||||
|
import com.chenhai.common.core.controller.BaseController; |
||||
|
import com.chenhai.common.core.domain.AjaxResult; |
||||
|
import com.chenhai.common.enums.BusinessType; |
||||
|
import com.chenhai.system.domain.SysMuhuUser; |
||||
|
import com.chenhai.system.service.ISysMuhuUserService; |
||||
|
import com.chenhai.common.utils.poi.ExcelUtil; |
||||
|
import com.chenhai.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 牧户用户Controller |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-03 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/system/muhuuser") |
||||
|
public class SysMuhuUserController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private ISysMuhuUserService sysMuhuUserService; |
||||
|
|
||||
|
/** |
||||
|
* 查询牧户用户列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:muhuuser:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(SysMuhuUser sysMuhuUser) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<SysMuhuUser> list = sysMuhuUserService.selectSysMuhuUserList(sysMuhuUser); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出牧户用户列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:muhuuser:export')") |
||||
|
@Log(title = "牧户用户", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, SysMuhuUser sysMuhuUser) |
||||
|
{ |
||||
|
List<SysMuhuUser> list = sysMuhuUserService.selectSysMuhuUserList(sysMuhuUser); |
||||
|
ExcelUtil<SysMuhuUser> util = new ExcelUtil<SysMuhuUser>(SysMuhuUser.class); |
||||
|
util.exportExcel(response, list, "牧户用户数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取牧户用户详细信息 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:muhuuser:query')") |
||||
|
@GetMapping(value = "/{userId}") |
||||
|
public AjaxResult getInfo(@PathVariable("userId") Long userId) |
||||
|
{ |
||||
|
return success(sysMuhuUserService.selectSysMuhuUserByUserId(userId)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增牧户用户 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:muhuuser:add')") |
||||
|
@Log(title = "牧户用户", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody SysMuhuUser sysMuhuUser) |
||||
|
{ |
||||
|
return toAjax(sysMuhuUserService.insertSysMuhuUser(sysMuhuUser)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改牧户用户 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:muhuuser:edit')") |
||||
|
@Log(title = "牧户用户", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody SysMuhuUser sysMuhuUser) |
||||
|
{ |
||||
|
return toAjax(sysMuhuUserService.updateSysMuhuUser(sysMuhuUser)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除牧户用户 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('system:muhuuser:remove')") |
||||
|
@Log(title = "牧户用户", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{userIds}") |
||||
|
public AjaxResult remove(@PathVariable Long[] userIds) |
||||
|
{ |
||||
|
return toAjax(sysMuhuUserService.deleteSysMuhuUserByUserIds(userIds)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,433 @@ |
|||||
|
package com.chenhai.muhu.domain; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.chenhai.common.annotation.Excel; |
||||
|
import com.chenhai.common.core.domain.BaseEntity; |
||||
|
|
||||
|
/** |
||||
|
* 经验分享对象 muhu_experience_share |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-30 |
||||
|
*/ |
||||
|
public class MuhuExperienceShare extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 主键ID */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 发布用户ID */ |
||||
|
@Excel(name = "发布用户ID") |
||||
|
private Long userId; |
||||
|
|
||||
|
/** 发布用户名 */ |
||||
|
@Excel(name = "发布用户名") |
||||
|
private String username; |
||||
|
|
||||
|
/** 用户昵称 */ |
||||
|
@Excel(name = "用户昵称") |
||||
|
private String userNickname; |
||||
|
|
||||
|
/** 用户头像 */ |
||||
|
@Excel(name = "用户头像") |
||||
|
private String userAvatar; |
||||
|
|
||||
|
/** 文章标题 */ |
||||
|
@Excel(name = "文章标题") |
||||
|
private String title; |
||||
|
|
||||
|
/** 文章内容 */ |
||||
|
@Excel(name = "文章内容") |
||||
|
private String content; |
||||
|
|
||||
|
/** 文章摘要 */ |
||||
|
@Excel(name = "文章摘要") |
||||
|
private String summary; |
||||
|
|
||||
|
/** 分类(如:养殖技术、疾病防治等) */ |
||||
|
@Excel(name = "分类", readConverterExp = "如=:养殖技术、疾病防治等") |
||||
|
private String category; |
||||
|
|
||||
|
/** 标签(多个用逗号分隔) */ |
||||
|
@Excel(name = "标签", readConverterExp = "多=个用逗号分隔") |
||||
|
private String tags; |
||||
|
|
||||
|
/** 封面图片 */ |
||||
|
@Excel(name = "封面图片") |
||||
|
private String coverImage; |
||||
|
|
||||
|
/** 文章图片(多个用逗号分隔) */ |
||||
|
@Excel(name = "文章图片", readConverterExp = "多=个用逗号分隔") |
||||
|
private String images; |
||||
|
|
||||
|
/** 附件(多个用逗号分隔) */ |
||||
|
@Excel(name = "附件", readConverterExp = "多=个用逗号分隔") |
||||
|
private String attachments; |
||||
|
|
||||
|
/** 状态(0-待审核,1-已发布,2-审核不通过,3-已下架) */ |
||||
|
@Excel(name = "状态", readConverterExp = "0=-待审核,1-已发布,2-审核不通过,3-已下架") |
||||
|
private Integer status; |
||||
|
|
||||
|
/** 审核备注 */ |
||||
|
@Excel(name = "审核备注") |
||||
|
private String auditRemark; |
||||
|
|
||||
|
/** 审核时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date auditTime; |
||||
|
|
||||
|
/** 审核人ID */ |
||||
|
@Excel(name = "审核人ID") |
||||
|
private Long auditUserId; |
||||
|
|
||||
|
/** 是否包含敏感词(0-否,1-是) */ |
||||
|
@Excel(name = "是否包含敏感词", readConverterExp = "0=-否,1-是") |
||||
|
private Integer hasSensitive; |
||||
|
|
||||
|
/** 敏感词列表(多个用逗号分隔) */ |
||||
|
@Excel(name = "敏感词列表", readConverterExp = "多=个用逗号分隔") |
||||
|
private String sensitiveWords; |
||||
|
|
||||
|
/** 是否已处理敏感词(0-未处理,1-已处理) */ |
||||
|
@Excel(name = "是否已处理敏感词", readConverterExp = "0=-未处理,1-已处理") |
||||
|
private Integer isHandled; |
||||
|
|
||||
|
/** 浏览次数 */ |
||||
|
@Excel(name = "浏览次数") |
||||
|
private Long viewCount; |
||||
|
|
||||
|
/** 点赞数 */ |
||||
|
@Excel(name = "点赞数") |
||||
|
private Long likeCount; |
||||
|
|
||||
|
/** 收藏数 */ |
||||
|
@Excel(name = "收藏数") |
||||
|
private Long collectCount; |
||||
|
|
||||
|
/** 分享数 */ |
||||
|
@Excel(name = "分享数") |
||||
|
private Long shareCount; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date createdAt; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date updatedAt; |
||||
|
|
||||
|
/** 发布时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date publishedAt; |
||||
|
|
||||
|
public void setId(Long id) |
||||
|
{ |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Long getId() |
||||
|
{ |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(Long userId) |
||||
|
{ |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public Long getUserId() |
||||
|
{ |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUsername(String username) |
||||
|
{ |
||||
|
this.username = username; |
||||
|
} |
||||
|
|
||||
|
public String getUsername() |
||||
|
{ |
||||
|
return username; |
||||
|
} |
||||
|
|
||||
|
public void setUserNickname(String userNickname) |
||||
|
{ |
||||
|
this.userNickname = userNickname; |
||||
|
} |
||||
|
|
||||
|
public String getUserNickname() |
||||
|
{ |
||||
|
return userNickname; |
||||
|
} |
||||
|
|
||||
|
public void setUserAvatar(String userAvatar) |
||||
|
{ |
||||
|
this.userAvatar = userAvatar; |
||||
|
} |
||||
|
|
||||
|
public String getUserAvatar() |
||||
|
{ |
||||
|
return userAvatar; |
||||
|
} |
||||
|
|
||||
|
public void setTitle(String title) |
||||
|
{ |
||||
|
this.title = title; |
||||
|
} |
||||
|
|
||||
|
public String getTitle() |
||||
|
{ |
||||
|
return title; |
||||
|
} |
||||
|
|
||||
|
public void setContent(String content) |
||||
|
{ |
||||
|
this.content = content; |
||||
|
} |
||||
|
|
||||
|
public String getContent() |
||||
|
{ |
||||
|
return content; |
||||
|
} |
||||
|
|
||||
|
public void setSummary(String summary) |
||||
|
{ |
||||
|
this.summary = summary; |
||||
|
} |
||||
|
|
||||
|
public String getSummary() |
||||
|
{ |
||||
|
return summary; |
||||
|
} |
||||
|
|
||||
|
public void setCategory(String category) |
||||
|
{ |
||||
|
this.category = category; |
||||
|
} |
||||
|
|
||||
|
public String getCategory() |
||||
|
{ |
||||
|
return category; |
||||
|
} |
||||
|
|
||||
|
public void setTags(String tags) |
||||
|
{ |
||||
|
this.tags = tags; |
||||
|
} |
||||
|
|
||||
|
public String getTags() |
||||
|
{ |
||||
|
return tags; |
||||
|
} |
||||
|
|
||||
|
public void setCoverImage(String coverImage) |
||||
|
{ |
||||
|
this.coverImage = coverImage; |
||||
|
} |
||||
|
|
||||
|
public String getCoverImage() |
||||
|
{ |
||||
|
return coverImage; |
||||
|
} |
||||
|
|
||||
|
public void setImages(String images) |
||||
|
{ |
||||
|
this.images = images; |
||||
|
} |
||||
|
|
||||
|
public String getImages() |
||||
|
{ |
||||
|
return images; |
||||
|
} |
||||
|
|
||||
|
public void setAttachments(String attachments) |
||||
|
{ |
||||
|
this.attachments = attachments; |
||||
|
} |
||||
|
|
||||
|
public String getAttachments() |
||||
|
{ |
||||
|
return attachments; |
||||
|
} |
||||
|
|
||||
|
public void setStatus(Integer status) |
||||
|
{ |
||||
|
this.status = status; |
||||
|
} |
||||
|
|
||||
|
public Integer getStatus() |
||||
|
{ |
||||
|
return status; |
||||
|
} |
||||
|
|
||||
|
public void setAuditRemark(String auditRemark) |
||||
|
{ |
||||
|
this.auditRemark = auditRemark; |
||||
|
} |
||||
|
|
||||
|
public String getAuditRemark() |
||||
|
{ |
||||
|
return auditRemark; |
||||
|
} |
||||
|
|
||||
|
public void setAuditTime(Date auditTime) |
||||
|
{ |
||||
|
this.auditTime = auditTime; |
||||
|
} |
||||
|
|
||||
|
public Date getAuditTime() |
||||
|
{ |
||||
|
return auditTime; |
||||
|
} |
||||
|
|
||||
|
public void setAuditUserId(Long auditUserId) |
||||
|
{ |
||||
|
this.auditUserId = auditUserId; |
||||
|
} |
||||
|
|
||||
|
public Long getAuditUserId() |
||||
|
{ |
||||
|
return auditUserId; |
||||
|
} |
||||
|
|
||||
|
public void setHasSensitive(Integer hasSensitive) |
||||
|
{ |
||||
|
this.hasSensitive = hasSensitive; |
||||
|
} |
||||
|
|
||||
|
public Integer getHasSensitive() |
||||
|
{ |
||||
|
return hasSensitive; |
||||
|
} |
||||
|
|
||||
|
public void setSensitiveWords(String sensitiveWords) |
||||
|
{ |
||||
|
this.sensitiveWords = sensitiveWords; |
||||
|
} |
||||
|
|
||||
|
public String getSensitiveWords() |
||||
|
{ |
||||
|
return sensitiveWords; |
||||
|
} |
||||
|
|
||||
|
public void setIsHandled(Integer isHandled) |
||||
|
{ |
||||
|
this.isHandled = isHandled; |
||||
|
} |
||||
|
|
||||
|
public Integer getIsHandled() |
||||
|
{ |
||||
|
return isHandled; |
||||
|
} |
||||
|
|
||||
|
public void setViewCount(Long viewCount) |
||||
|
{ |
||||
|
this.viewCount = viewCount; |
||||
|
} |
||||
|
|
||||
|
public Long getViewCount() |
||||
|
{ |
||||
|
return viewCount; |
||||
|
} |
||||
|
|
||||
|
public void setLikeCount(Long likeCount) |
||||
|
{ |
||||
|
this.likeCount = likeCount; |
||||
|
} |
||||
|
|
||||
|
public Long getLikeCount() |
||||
|
{ |
||||
|
return likeCount; |
||||
|
} |
||||
|
|
||||
|
public void setCollectCount(Long collectCount) |
||||
|
{ |
||||
|
this.collectCount = collectCount; |
||||
|
} |
||||
|
|
||||
|
public Long getCollectCount() |
||||
|
{ |
||||
|
return collectCount; |
||||
|
} |
||||
|
|
||||
|
public void setShareCount(Long shareCount) |
||||
|
{ |
||||
|
this.shareCount = shareCount; |
||||
|
} |
||||
|
|
||||
|
public Long getShareCount() |
||||
|
{ |
||||
|
return shareCount; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedAt(Date createdAt) |
||||
|
{ |
||||
|
this.createdAt = createdAt; |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedAt() |
||||
|
{ |
||||
|
return createdAt; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedAt(Date updatedAt) |
||||
|
{ |
||||
|
this.updatedAt = updatedAt; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedAt() |
||||
|
{ |
||||
|
return updatedAt; |
||||
|
} |
||||
|
|
||||
|
public void setPublishedAt(Date publishedAt) |
||||
|
{ |
||||
|
this.publishedAt = publishedAt; |
||||
|
} |
||||
|
|
||||
|
public Date getPublishedAt() |
||||
|
{ |
||||
|
return publishedAt; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("id", getId()) |
||||
|
.append("userId", getUserId()) |
||||
|
.append("username", getUsername()) |
||||
|
.append("userNickname", getUserNickname()) |
||||
|
.append("userAvatar", getUserAvatar()) |
||||
|
.append("title", getTitle()) |
||||
|
.append("content", getContent()) |
||||
|
.append("summary", getSummary()) |
||||
|
.append("category", getCategory()) |
||||
|
.append("tags", getTags()) |
||||
|
.append("coverImage", getCoverImage()) |
||||
|
.append("images", getImages()) |
||||
|
.append("attachments", getAttachments()) |
||||
|
.append("status", getStatus()) |
||||
|
.append("auditRemark", getAuditRemark()) |
||||
|
.append("auditTime", getAuditTime()) |
||||
|
.append("auditUserId", getAuditUserId()) |
||||
|
.append("hasSensitive", getHasSensitive()) |
||||
|
.append("sensitiveWords", getSensitiveWords()) |
||||
|
.append("isHandled", getIsHandled()) |
||||
|
.append("viewCount", getViewCount()) |
||||
|
.append("likeCount", getLikeCount()) |
||||
|
.append("collectCount", getCollectCount()) |
||||
|
.append("shareCount", getShareCount()) |
||||
|
.append("createdAt", getCreatedAt()) |
||||
|
.append("updatedAt", getUpdatedAt()) |
||||
|
.append("publishedAt", getPublishedAt()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.chenhai.muhu.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.chenhai.muhu.domain.MuhuExperienceShare; |
||||
|
|
||||
|
/** |
||||
|
* 经验分享Mapper接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-30 |
||||
|
*/ |
||||
|
public interface MuhuExperienceShareMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询经验分享 |
||||
|
* |
||||
|
* @param id 经验分享主键 |
||||
|
* @return 经验分享 |
||||
|
*/ |
||||
|
public MuhuExperienceShare selectMuhuExperienceShareById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询经验分享列表 |
||||
|
* |
||||
|
* @param muhuExperienceShare 经验分享 |
||||
|
* @return 经验分享集合 |
||||
|
*/ |
||||
|
public List<MuhuExperienceShare> selectMuhuExperienceShareList(MuhuExperienceShare muhuExperienceShare); |
||||
|
|
||||
|
/** |
||||
|
* 新增经验分享 |
||||
|
* |
||||
|
* @param muhuExperienceShare 经验分享 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertMuhuExperienceShare(MuhuExperienceShare muhuExperienceShare); |
||||
|
|
||||
|
/** |
||||
|
* 修改经验分享 |
||||
|
* |
||||
|
* @param muhuExperienceShare 经验分享 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateMuhuExperienceShare(MuhuExperienceShare muhuExperienceShare); |
||||
|
|
||||
|
/** |
||||
|
* 删除经验分享 |
||||
|
* |
||||
|
* @param id 经验分享主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteMuhuExperienceShareById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除经验分享 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteMuhuExperienceShareByIds(Long[] ids); |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.chenhai.muhu.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.chenhai.muhu.domain.MuhuExperienceShare; |
||||
|
|
||||
|
/** |
||||
|
* 经验分享Service接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-30 |
||||
|
*/ |
||||
|
public interface IMuhuExperienceShareService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询经验分享 |
||||
|
* |
||||
|
* @param id 经验分享主键 |
||||
|
* @return 经验分享 |
||||
|
*/ |
||||
|
public MuhuExperienceShare selectMuhuExperienceShareById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询经验分享列表 |
||||
|
* |
||||
|
* @param muhuExperienceShare 经验分享 |
||||
|
* @return 经验分享集合 |
||||
|
*/ |
||||
|
public List<MuhuExperienceShare> selectMuhuExperienceShareList(MuhuExperienceShare muhuExperienceShare); |
||||
|
|
||||
|
/** |
||||
|
* 新增经验分享 |
||||
|
* |
||||
|
* @param muhuExperienceShare 经验分享 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertMuhuExperienceShare(MuhuExperienceShare muhuExperienceShare); |
||||
|
|
||||
|
/** |
||||
|
* 修改经验分享 |
||||
|
* |
||||
|
* @param muhuExperienceShare 经验分享 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateMuhuExperienceShare(MuhuExperienceShare muhuExperienceShare); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除经验分享 |
||||
|
* |
||||
|
* @param ids 需要删除的经验分享主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteMuhuExperienceShareByIds(Long[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 删除经验分享信息 |
||||
|
* |
||||
|
* @param id 经验分享主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteMuhuExperienceShareById(Long id); |
||||
|
} |
||||
@ -0,0 +1,93 @@ |
|||||
|
package com.chenhai.muhu.service.impl; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.chenhai.muhu.mapper.MuhuExperienceShareMapper; |
||||
|
import com.chenhai.muhu.domain.MuhuExperienceShare; |
||||
|
import com.chenhai.muhu.service.IMuhuExperienceShareService; |
||||
|
|
||||
|
/** |
||||
|
* 经验分享Service业务层处理 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-01-30 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class MuhuExperienceShareServiceImpl implements IMuhuExperienceShareService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private MuhuExperienceShareMapper muhuExperienceShareMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询经验分享 |
||||
|
* |
||||
|
* @param id 经验分享主键 |
||||
|
* @return 经验分享 |
||||
|
*/ |
||||
|
@Override |
||||
|
public MuhuExperienceShare selectMuhuExperienceShareById(Long id) |
||||
|
{ |
||||
|
return muhuExperienceShareMapper.selectMuhuExperienceShareById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询经验分享列表 |
||||
|
* |
||||
|
* @param muhuExperienceShare 经验分享 |
||||
|
* @return 经验分享 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<MuhuExperienceShare> selectMuhuExperienceShareList(MuhuExperienceShare muhuExperienceShare) |
||||
|
{ |
||||
|
return muhuExperienceShareMapper.selectMuhuExperienceShareList(muhuExperienceShare); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增经验分享 |
||||
|
* |
||||
|
* @param muhuExperienceShare 经验分享 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertMuhuExperienceShare(MuhuExperienceShare muhuExperienceShare) |
||||
|
{ |
||||
|
return muhuExperienceShareMapper.insertMuhuExperienceShare(muhuExperienceShare); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改经验分享 |
||||
|
* |
||||
|
* @param muhuExperienceShare 经验分享 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateMuhuExperienceShare(MuhuExperienceShare muhuExperienceShare) |
||||
|
{ |
||||
|
return muhuExperienceShareMapper.updateMuhuExperienceShare(muhuExperienceShare); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除经验分享 |
||||
|
* |
||||
|
* @param ids 需要删除的经验分享主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteMuhuExperienceShareByIds(Long[] ids) |
||||
|
{ |
||||
|
return muhuExperienceShareMapper.deleteMuhuExperienceShareByIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除经验分享信息 |
||||
|
* |
||||
|
* @param id 经验分享主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteMuhuExperienceShareById(Long id) |
||||
|
{ |
||||
|
return muhuExperienceShareMapper.deleteMuhuExperienceShareById(id); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,155 @@ |
|||||
|
package com.chenhai.system.domain; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.chenhai.common.annotation.Excel; |
||||
|
import com.chenhai.common.core.domain.BaseEntity; |
||||
|
|
||||
|
/** |
||||
|
* 回复对象 sys_answer_again |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-02 |
||||
|
*/ |
||||
|
public class SysAnswerAgain extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** $column.columnComment */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 对应的回复id */ |
||||
|
@Excel(name = "对应的回复id") |
||||
|
private Long answerId; |
||||
|
|
||||
|
/** 用户id */ |
||||
|
@Excel(name = "用户id") |
||||
|
private String userId; |
||||
|
|
||||
|
/** 用户名 */ |
||||
|
@Excel(name = "用户名") |
||||
|
private String username; |
||||
|
|
||||
|
/** 用户昵称 */ |
||||
|
private String nickName; |
||||
|
|
||||
|
/** 用户头像 */ |
||||
|
private String avatar; |
||||
|
|
||||
|
/** 回复内容 */ |
||||
|
@Excel(name = "回复内容") |
||||
|
private String content; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date createdAt; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date updatedAt; |
||||
|
|
||||
|
public void setId(Long id) |
||||
|
{ |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Long getId() |
||||
|
{ |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setAnswerId(Long answerId) |
||||
|
{ |
||||
|
this.answerId = answerId; |
||||
|
} |
||||
|
|
||||
|
public Long getAnswerId() |
||||
|
{ |
||||
|
return answerId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(String userId) |
||||
|
{ |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public String getUserId() |
||||
|
{ |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUsername(String username) |
||||
|
{ |
||||
|
this.username = username; |
||||
|
} |
||||
|
|
||||
|
public String getUsername() |
||||
|
{ |
||||
|
return username; |
||||
|
} |
||||
|
|
||||
|
public void setContent(String content) |
||||
|
{ |
||||
|
this.content = content; |
||||
|
} |
||||
|
|
||||
|
public String getContent() |
||||
|
{ |
||||
|
return content; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedAt(Date createdAt) |
||||
|
{ |
||||
|
this.createdAt = createdAt; |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedAt() |
||||
|
{ |
||||
|
return createdAt; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedAt(Date updatedAt) |
||||
|
{ |
||||
|
this.updatedAt = updatedAt; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedAt() |
||||
|
{ |
||||
|
return updatedAt; |
||||
|
} |
||||
|
|
||||
|
public String getNickName() { |
||||
|
return nickName; |
||||
|
} |
||||
|
|
||||
|
public void setNickName(String nickName) { |
||||
|
this.nickName = nickName; |
||||
|
} |
||||
|
|
||||
|
public String getAvatar() { |
||||
|
return avatar; |
||||
|
} |
||||
|
|
||||
|
public void setAvatar(String avatar) { |
||||
|
this.avatar = avatar; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("id", getId()) |
||||
|
.append("answerId", getAnswerId()) |
||||
|
.append("userId", getUserId()) |
||||
|
.append("username", getUsername()) |
||||
|
.append("content", getContent()) |
||||
|
.append("createdAt", getCreatedAt()) |
||||
|
.append("updatedAt", getUpdatedAt()) |
||||
|
.append("nickName", getNickName()) |
||||
|
.append("avatar", getAvatar()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,222 @@ |
|||||
|
package com.chenhai.system.domain; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.chenhai.common.annotation.Excel; |
||||
|
import com.chenhai.common.core.domain.BaseEntity; |
||||
|
|
||||
|
/** |
||||
|
* 牧户用户对象 sys_muhu_user |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-03 |
||||
|
*/ |
||||
|
public class SysMuhuUser extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 用户ID,关联 sys_user.user_id */ |
||||
|
private Long userId; |
||||
|
|
||||
|
/** 真实姓名 */ |
||||
|
@Excel(name = "真实姓名") |
||||
|
private String realName; |
||||
|
|
||||
|
/** 身份证号 */ |
||||
|
@Excel(name = "身份证号") |
||||
|
private String idCard; |
||||
|
|
||||
|
/** 身份证正面照 */ |
||||
|
@Excel(name = "身份证正面照") |
||||
|
private String idCardFront; |
||||
|
|
||||
|
/** 身份证反面照 */ |
||||
|
@Excel(name = "身份证反面照") |
||||
|
private String idCardBack; |
||||
|
|
||||
|
/** 人脸识别照片 */ |
||||
|
@Excel(name = "人脸识别照片") |
||||
|
private String faceImage; |
||||
|
|
||||
|
/** 认证状态(0未认证 1已认证 2审核中 3认证失败) */ |
||||
|
@Excel(name = "认证状态", readConverterExp = "0=未认证,1=已认证,2=审核中,3=认证失败") |
||||
|
private String authStatus; |
||||
|
|
||||
|
/** 认证时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date authTime; |
||||
|
|
||||
|
/** 认证失败原因 */ |
||||
|
@Excel(name = "认证失败原因") |
||||
|
private String authFailReason; |
||||
|
|
||||
|
/** 安全问题 */ |
||||
|
@Excel(name = "安全问题") |
||||
|
private String securityQuestion; |
||||
|
|
||||
|
/** 安全答案 */ |
||||
|
@Excel(name = "安全答案") |
||||
|
private String securityAnswer; |
||||
|
|
||||
|
/** 最后登录时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date lastLoginTime; |
||||
|
|
||||
|
/** 最后登录IP */ |
||||
|
@Excel(name = "最后登录IP") |
||||
|
private String lastLoginIp; |
||||
|
|
||||
|
public void setUserId(Long userId) |
||||
|
{ |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public Long getUserId() |
||||
|
{ |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setRealName(String realName) |
||||
|
{ |
||||
|
this.realName = realName; |
||||
|
} |
||||
|
|
||||
|
public String getRealName() |
||||
|
{ |
||||
|
return realName; |
||||
|
} |
||||
|
|
||||
|
public void setIdCard(String idCard) |
||||
|
{ |
||||
|
this.idCard = idCard; |
||||
|
} |
||||
|
|
||||
|
public String getIdCard() |
||||
|
{ |
||||
|
return idCard; |
||||
|
} |
||||
|
|
||||
|
public void setIdCardFront(String idCardFront) |
||||
|
{ |
||||
|
this.idCardFront = idCardFront; |
||||
|
} |
||||
|
|
||||
|
public String getIdCardFront() |
||||
|
{ |
||||
|
return idCardFront; |
||||
|
} |
||||
|
|
||||
|
public void setIdCardBack(String idCardBack) |
||||
|
{ |
||||
|
this.idCardBack = idCardBack; |
||||
|
} |
||||
|
|
||||
|
public String getIdCardBack() |
||||
|
{ |
||||
|
return idCardBack; |
||||
|
} |
||||
|
|
||||
|
public void setFaceImage(String faceImage) |
||||
|
{ |
||||
|
this.faceImage = faceImage; |
||||
|
} |
||||
|
|
||||
|
public String getFaceImage() |
||||
|
{ |
||||
|
return faceImage; |
||||
|
} |
||||
|
|
||||
|
public void setAuthStatus(String authStatus) |
||||
|
{ |
||||
|
this.authStatus = authStatus; |
||||
|
} |
||||
|
|
||||
|
public String getAuthStatus() |
||||
|
{ |
||||
|
return authStatus; |
||||
|
} |
||||
|
|
||||
|
public void setAuthTime(Date authTime) |
||||
|
{ |
||||
|
this.authTime = authTime; |
||||
|
} |
||||
|
|
||||
|
public Date getAuthTime() |
||||
|
{ |
||||
|
return authTime; |
||||
|
} |
||||
|
|
||||
|
public void setAuthFailReason(String authFailReason) |
||||
|
{ |
||||
|
this.authFailReason = authFailReason; |
||||
|
} |
||||
|
|
||||
|
public String getAuthFailReason() |
||||
|
{ |
||||
|
return authFailReason; |
||||
|
} |
||||
|
|
||||
|
public void setSecurityQuestion(String securityQuestion) |
||||
|
{ |
||||
|
this.securityQuestion = securityQuestion; |
||||
|
} |
||||
|
|
||||
|
public String getSecurityQuestion() |
||||
|
{ |
||||
|
return securityQuestion; |
||||
|
} |
||||
|
|
||||
|
public void setSecurityAnswer(String securityAnswer) |
||||
|
{ |
||||
|
this.securityAnswer = securityAnswer; |
||||
|
} |
||||
|
|
||||
|
public String getSecurityAnswer() |
||||
|
{ |
||||
|
return securityAnswer; |
||||
|
} |
||||
|
|
||||
|
public void setLastLoginTime(Date lastLoginTime) |
||||
|
{ |
||||
|
this.lastLoginTime = lastLoginTime; |
||||
|
} |
||||
|
|
||||
|
public Date getLastLoginTime() |
||||
|
{ |
||||
|
return lastLoginTime; |
||||
|
} |
||||
|
|
||||
|
public void setLastLoginIp(String lastLoginIp) |
||||
|
{ |
||||
|
this.lastLoginIp = lastLoginIp; |
||||
|
} |
||||
|
|
||||
|
public String getLastLoginIp() |
||||
|
{ |
||||
|
return lastLoginIp; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("userId", getUserId()) |
||||
|
.append("realName", getRealName()) |
||||
|
.append("idCard", getIdCard()) |
||||
|
.append("idCardFront", getIdCardFront()) |
||||
|
.append("idCardBack", getIdCardBack()) |
||||
|
.append("faceImage", getFaceImage()) |
||||
|
.append("authStatus", getAuthStatus()) |
||||
|
.append("authTime", getAuthTime()) |
||||
|
.append("authFailReason", getAuthFailReason()) |
||||
|
.append("securityQuestion", getSecurityQuestion()) |
||||
|
.append("securityAnswer", getSecurityAnswer()) |
||||
|
.append("lastLoginTime", getLastLoginTime()) |
||||
|
.append("lastLoginIp", getLastLoginIp()) |
||||
|
.append("updateTime", getUpdateTime()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.chenhai.system.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.chenhai.system.domain.SysAnswerAgain; |
||||
|
|
||||
|
/** |
||||
|
* 回复Mapper接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-02 |
||||
|
*/ |
||||
|
public interface SysAnswerAgainMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询回复 |
||||
|
* |
||||
|
* @param id 回复主键 |
||||
|
* @return 回复 |
||||
|
*/ |
||||
|
public SysAnswerAgain selectSysAnswerAgainById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询回复列表 |
||||
|
* |
||||
|
* @param sysAnswerAgain 回复 |
||||
|
* @return 回复集合 |
||||
|
*/ |
||||
|
public List<SysAnswerAgain> selectSysAnswerAgainList(SysAnswerAgain sysAnswerAgain); |
||||
|
|
||||
|
/** |
||||
|
* 新增回复 |
||||
|
* |
||||
|
* @param sysAnswerAgain 回复 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertSysAnswerAgain(SysAnswerAgain sysAnswerAgain); |
||||
|
|
||||
|
/** |
||||
|
* 修改回复 |
||||
|
* |
||||
|
* @param sysAnswerAgain 回复 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateSysAnswerAgain(SysAnswerAgain sysAnswerAgain); |
||||
|
|
||||
|
/** |
||||
|
* 删除回复 |
||||
|
* |
||||
|
* @param id 回复主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysAnswerAgainById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除回复 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysAnswerAgainByIds(Long[] ids); |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.chenhai.system.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.chenhai.system.domain.SysMuhuUser; |
||||
|
|
||||
|
/** |
||||
|
* 牧户用户Mapper接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-03 |
||||
|
*/ |
||||
|
public interface SysMuhuUserMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询牧户用户 |
||||
|
* |
||||
|
* @param userId 牧户用户主键 |
||||
|
* @return 牧户用户 |
||||
|
*/ |
||||
|
public SysMuhuUser selectSysMuhuUserByUserId(Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 查询牧户用户列表 |
||||
|
* |
||||
|
* @param sysMuhuUser 牧户用户 |
||||
|
* @return 牧户用户集合 |
||||
|
*/ |
||||
|
public List<SysMuhuUser> selectSysMuhuUserList(SysMuhuUser sysMuhuUser); |
||||
|
|
||||
|
/** |
||||
|
* 新增牧户用户 |
||||
|
* |
||||
|
* @param sysMuhuUser 牧户用户 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertSysMuhuUser(SysMuhuUser sysMuhuUser); |
||||
|
|
||||
|
/** |
||||
|
* 修改牧户用户 |
||||
|
* |
||||
|
* @param sysMuhuUser 牧户用户 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateSysMuhuUser(SysMuhuUser sysMuhuUser); |
||||
|
|
||||
|
/** |
||||
|
* 删除牧户用户 |
||||
|
* |
||||
|
* @param userId 牧户用户主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysMuhuUserByUserId(Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除牧户用户 |
||||
|
* |
||||
|
* @param userIds 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysMuhuUserByUserIds(Long[] userIds); |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.chenhai.system.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.chenhai.system.domain.SysAnswerAgain; |
||||
|
|
||||
|
/** |
||||
|
* 回复Service接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-02 |
||||
|
*/ |
||||
|
public interface ISysAnswerAgainService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询回复 |
||||
|
* |
||||
|
* @param id 回复主键 |
||||
|
* @return 回复 |
||||
|
*/ |
||||
|
public SysAnswerAgain selectSysAnswerAgainById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询回复列表 |
||||
|
* |
||||
|
* @param sysAnswerAgain 回复 |
||||
|
* @return 回复集合 |
||||
|
*/ |
||||
|
public List<SysAnswerAgain> selectSysAnswerAgainList(SysAnswerAgain sysAnswerAgain); |
||||
|
|
||||
|
/** |
||||
|
* 新增回复 |
||||
|
* |
||||
|
* @param sysAnswerAgain 回复 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertSysAnswerAgain(SysAnswerAgain sysAnswerAgain); |
||||
|
|
||||
|
/** |
||||
|
* 修改回复 |
||||
|
* |
||||
|
* @param sysAnswerAgain 回复 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateSysAnswerAgain(SysAnswerAgain sysAnswerAgain); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除回复 |
||||
|
* |
||||
|
* @param ids 需要删除的回复主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysAnswerAgainByIds(Long[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 删除回复信息 |
||||
|
* |
||||
|
* @param id 回复主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysAnswerAgainById(Long id); |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
package com.chenhai.system.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.chenhai.system.domain.SysMuhuUser; |
||||
|
|
||||
|
/** |
||||
|
* 牧户用户Service接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-03 |
||||
|
*/ |
||||
|
public interface ISysMuhuUserService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询牧户用户 |
||||
|
* |
||||
|
* @param userId 牧户用户主键 |
||||
|
* @return 牧户用户 |
||||
|
*/ |
||||
|
public SysMuhuUser selectSysMuhuUserByUserId(Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 查询牧户用户列表 |
||||
|
* |
||||
|
* @param sysMuhuUser 牧户用户 |
||||
|
* @return 牧户用户集合 |
||||
|
*/ |
||||
|
public List<SysMuhuUser> selectSysMuhuUserList(SysMuhuUser sysMuhuUser); |
||||
|
|
||||
|
/** |
||||
|
* 新增牧户用户 |
||||
|
* |
||||
|
* @param sysMuhuUser 牧户用户 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertSysMuhuUser(SysMuhuUser sysMuhuUser); |
||||
|
|
||||
|
/** |
||||
|
* 修改牧户用户 |
||||
|
* |
||||
|
* @param sysMuhuUser 牧户用户 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateSysMuhuUser(SysMuhuUser sysMuhuUser); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除牧户用户 |
||||
|
* |
||||
|
* @param userIds 需要删除的牧户用户主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysMuhuUserByUserIds(Long[] userIds); |
||||
|
|
||||
|
/** |
||||
|
* 删除牧户用户信息 |
||||
|
* |
||||
|
* @param userId 牧户用户主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSysMuhuUserByUserId(Long userId); |
||||
|
} |
||||
@ -0,0 +1,121 @@ |
|||||
|
package com.chenhai.system.service.impl; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.chenhai.common.utils.SecurityUtils; |
||||
|
import com.chenhai.system.domain.SysAnswerAgain; |
||||
|
import com.chenhai.system.mapper.SysAnswerAgainMapper; |
||||
|
import com.chenhai.system.mapper.SysUserMapper; |
||||
|
import com.chenhai.system.service.ISysAnswerAgainService; |
||||
|
|
||||
|
/** |
||||
|
* 回复Service业务层处理 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class SysAnswerAgainServiceImpl implements ISysAnswerAgainService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private SysAnswerAgainMapper sysAnswerAgainMapper; |
||||
|
|
||||
|
@Autowired |
||||
|
private SysUserMapper sysUserMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询回复 |
||||
|
* |
||||
|
* @param id 回复主键 |
||||
|
* @return 回复 |
||||
|
*/ |
||||
|
@Override |
||||
|
public SysAnswerAgain selectSysAnswerAgainById(Long id) |
||||
|
{ |
||||
|
return sysAnswerAgainMapper.selectSysAnswerAgainById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询回复列表 |
||||
|
* |
||||
|
* @param sysAnswerAgain 回复 |
||||
|
* @return 回复 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<SysAnswerAgain> selectSysAnswerAgainList(SysAnswerAgain sysAnswerAgain) |
||||
|
{ |
||||
|
return sysAnswerAgainMapper.selectSysAnswerAgainList(sysAnswerAgain); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增回复 |
||||
|
* |
||||
|
* @param sysAnswerAgain 回复 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertSysAnswerAgain(SysAnswerAgain sysAnswerAgain) |
||||
|
{ |
||||
|
// 获取当前登录用户信息 |
||||
|
Long userId = SecurityUtils.getUserId(); |
||||
|
com.chenhai.common.core.domain.entity.SysUser currentUser = sysUserMapper.selectUserById(userId); |
||||
|
|
||||
|
if (currentUser != null) { |
||||
|
// 自动设置用户信息 |
||||
|
sysAnswerAgain.setUserId(currentUser.getUserId().toString()); |
||||
|
sysAnswerAgain.setUsername(currentUser.getUserName()); |
||||
|
} |
||||
|
|
||||
|
// 设置创建和更新时间 |
||||
|
Date now = new Date(); |
||||
|
if (sysAnswerAgain.getCreatedAt() == null) { |
||||
|
sysAnswerAgain.setCreatedAt(now); |
||||
|
} |
||||
|
if (sysAnswerAgain.getUpdatedAt() == null) { |
||||
|
sysAnswerAgain.setUpdatedAt(now); |
||||
|
} |
||||
|
|
||||
|
return sysAnswerAgainMapper.insertSysAnswerAgain(sysAnswerAgain); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改回复 |
||||
|
* |
||||
|
* @param sysAnswerAgain 回复 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateSysAnswerAgain(SysAnswerAgain sysAnswerAgain) |
||||
|
{ |
||||
|
// 更新时设置更新时间 |
||||
|
sysAnswerAgain.setUpdatedAt(new Date()); |
||||
|
|
||||
|
return sysAnswerAgainMapper.updateSysAnswerAgain(sysAnswerAgain); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除回复 |
||||
|
* |
||||
|
* @param ids 需要删除的回复主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteSysAnswerAgainByIds(Long[] ids) |
||||
|
{ |
||||
|
return sysAnswerAgainMapper.deleteSysAnswerAgainByIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除回复信息 |
||||
|
* |
||||
|
* @param id 回复主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteSysAnswerAgainById(Long id) |
||||
|
{ |
||||
|
return sysAnswerAgainMapper.deleteSysAnswerAgainById(id); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
package com.chenhai.system.service.impl; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.chenhai.common.utils.DateUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.chenhai.system.mapper.SysMuhuUserMapper; |
||||
|
import com.chenhai.system.domain.SysMuhuUser; |
||||
|
import com.chenhai.system.service.ISysMuhuUserService; |
||||
|
|
||||
|
/** |
||||
|
* 牧户用户Service业务层处理 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2026-02-03 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class SysMuhuUserServiceImpl implements ISysMuhuUserService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private SysMuhuUserMapper sysMuhuUserMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询牧户用户 |
||||
|
* |
||||
|
* @param userId 牧户用户主键 |
||||
|
* @return 牧户用户 |
||||
|
*/ |
||||
|
@Override |
||||
|
public SysMuhuUser selectSysMuhuUserByUserId(Long userId) |
||||
|
{ |
||||
|
return sysMuhuUserMapper.selectSysMuhuUserByUserId(userId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询牧户用户列表 |
||||
|
* |
||||
|
* @param sysMuhuUser 牧户用户 |
||||
|
* @return 牧户用户 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<SysMuhuUser> selectSysMuhuUserList(SysMuhuUser sysMuhuUser) |
||||
|
{ |
||||
|
return sysMuhuUserMapper.selectSysMuhuUserList(sysMuhuUser); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增牧户用户 |
||||
|
* |
||||
|
* @param sysMuhuUser 牧户用户 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertSysMuhuUser(SysMuhuUser sysMuhuUser) |
||||
|
{ |
||||
|
return sysMuhuUserMapper.insertSysMuhuUser(sysMuhuUser); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改牧户用户 |
||||
|
* |
||||
|
* @param sysMuhuUser 牧户用户 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateSysMuhuUser(SysMuhuUser sysMuhuUser) |
||||
|
{ |
||||
|
sysMuhuUser.setUpdateTime(DateUtils.getNowDate()); |
||||
|
return sysMuhuUserMapper.updateSysMuhuUser(sysMuhuUser); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除牧户用户 |
||||
|
* |
||||
|
* @param userIds 需要删除的牧户用户主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteSysMuhuUserByUserIds(Long[] userIds) |
||||
|
{ |
||||
|
return sysMuhuUserMapper.deleteSysMuhuUserByUserIds(userIds); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除牧户用户信息 |
||||
|
* |
||||
|
* @param userId 牧户用户主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteSysMuhuUserByUserId(Long userId) |
||||
|
{ |
||||
|
return sysMuhuUserMapper.deleteSysMuhuUserByUserId(userId); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,181 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.chenhai.muhu.mapper.MuhuExperienceShareMapper"> |
||||
|
|
||||
|
<resultMap type="MuhuExperienceShare" id="MuhuExperienceShareResult"> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="userId" column="user_id" /> |
||||
|
<result property="username" column="username" /> |
||||
|
<result property="userNickname" column="user_nickname" /> |
||||
|
<result property="userAvatar" column="user_avatar" /> |
||||
|
<result property="title" column="title" /> |
||||
|
<result property="content" column="content" /> |
||||
|
<result property="summary" column="summary" /> |
||||
|
<result property="category" column="category" /> |
||||
|
<result property="tags" column="tags" /> |
||||
|
<result property="coverImage" column="cover_image" /> |
||||
|
<result property="images" column="images" /> |
||||
|
<result property="attachments" column="attachments" /> |
||||
|
<result property="status" column="status" /> |
||||
|
<result property="auditRemark" column="audit_remark" /> |
||||
|
<result property="auditTime" column="audit_time" /> |
||||
|
<result property="auditUserId" column="audit_user_id" /> |
||||
|
<result property="hasSensitive" column="has_sensitive" /> |
||||
|
<result property="sensitiveWords" column="sensitive_words" /> |
||||
|
<result property="isHandled" column="is_handled" /> |
||||
|
<result property="viewCount" column="view_count" /> |
||||
|
<result property="likeCount" column="like_count" /> |
||||
|
<result property="collectCount" column="collect_count" /> |
||||
|
<result property="shareCount" column="share_count" /> |
||||
|
<result property="createdAt" column="created_at" /> |
||||
|
<result property="updatedAt" column="updated_at" /> |
||||
|
<result property="publishedAt" column="published_at" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectMuhuExperienceShareVo"> |
||||
|
select id, user_id, username, user_nickname, user_avatar, title, content, summary, category, tags, cover_image, images, attachments, status, audit_remark, audit_time, audit_user_id, has_sensitive, sensitive_words, is_handled, view_count, like_count, collect_count, share_count, created_at, updated_at, published_at from muhu_experience_share |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectMuhuExperienceShareList" parameterType="MuhuExperienceShare" resultMap="MuhuExperienceShareResult"> |
||||
|
<include refid="selectMuhuExperienceShareVo"/> |
||||
|
<where> |
||||
|
<if test="userId != null "> and user_id = #{userId}</if> |
||||
|
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if> |
||||
|
<if test="userNickname != null and userNickname != ''"> and user_nickname like concat('%', #{userNickname}, '%')</if> |
||||
|
<if test="userAvatar != null and userAvatar != ''"> and user_avatar = #{userAvatar}</if> |
||||
|
<if test="title != null and title != ''"> and title = #{title}</if> |
||||
|
<if test="content != null and content != ''"> and content = #{content}</if> |
||||
|
<if test="summary != null and summary != ''"> and summary = #{summary}</if> |
||||
|
<if test="category != null and category != ''"> and category = #{category}</if> |
||||
|
<if test="tags != null and tags != ''"> and tags = #{tags}</if> |
||||
|
<if test="coverImage != null and coverImage != ''"> and cover_image = #{coverImage}</if> |
||||
|
<if test="images != null and images != ''"> and images = #{images}</if> |
||||
|
<if test="attachments != null and attachments != ''"> and attachments = #{attachments}</if> |
||||
|
<if test="status != null "> and status = #{status}</if> |
||||
|
<if test="auditRemark != null and auditRemark != ''"> and audit_remark = #{auditRemark}</if> |
||||
|
<if test="auditTime != null "> and audit_time = #{auditTime}</if> |
||||
|
<if test="auditUserId != null "> and audit_user_id = #{auditUserId}</if> |
||||
|
<if test="hasSensitive != null "> and has_sensitive = #{hasSensitive}</if> |
||||
|
<if test="sensitiveWords != null and sensitiveWords != ''"> and sensitive_words = #{sensitiveWords}</if> |
||||
|
<if test="isHandled != null "> and is_handled = #{isHandled}</if> |
||||
|
<if test="viewCount != null "> and view_count = #{viewCount}</if> |
||||
|
<if test="likeCount != null "> and like_count = #{likeCount}</if> |
||||
|
<if test="collectCount != null "> and collect_count = #{collectCount}</if> |
||||
|
<if test="shareCount != null "> and share_count = #{shareCount}</if> |
||||
|
<if test="createdAt != null "> and created_at = #{createdAt}</if> |
||||
|
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if> |
||||
|
<if test="publishedAt != null "> and published_at = #{publishedAt}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectMuhuExperienceShareById" parameterType="Long" resultMap="MuhuExperienceShareResult"> |
||||
|
<include refid="selectMuhuExperienceShareVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertMuhuExperienceShare" parameterType="MuhuExperienceShare" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into muhu_experience_share |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="userId != null">user_id,</if> |
||||
|
<if test="username != null">username,</if> |
||||
|
<if test="userNickname != null">user_nickname,</if> |
||||
|
<if test="userAvatar != null">user_avatar,</if> |
||||
|
<if test="title != null and title != ''">title,</if> |
||||
|
<if test="content != null and content != ''">content,</if> |
||||
|
<if test="summary != null">summary,</if> |
||||
|
<if test="category != null">category,</if> |
||||
|
<if test="tags != null">tags,</if> |
||||
|
<if test="coverImage != null">cover_image,</if> |
||||
|
<if test="images != null">images,</if> |
||||
|
<if test="attachments != null">attachments,</if> |
||||
|
<if test="status != null">status,</if> |
||||
|
<if test="auditRemark != null">audit_remark,</if> |
||||
|
<if test="auditTime != null">audit_time,</if> |
||||
|
<if test="auditUserId != null">audit_user_id,</if> |
||||
|
<if test="hasSensitive != null">has_sensitive,</if> |
||||
|
<if test="sensitiveWords != null">sensitive_words,</if> |
||||
|
<if test="isHandled != null">is_handled,</if> |
||||
|
<if test="viewCount != null">view_count,</if> |
||||
|
<if test="likeCount != null">like_count,</if> |
||||
|
<if test="collectCount != null">collect_count,</if> |
||||
|
<if test="shareCount != null">share_count,</if> |
||||
|
<if test="createdAt != null">created_at,</if> |
||||
|
<if test="updatedAt != null">updated_at,</if> |
||||
|
<if test="publishedAt != null">published_at,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="userId != null">#{userId},</if> |
||||
|
<if test="username != null">#{username},</if> |
||||
|
<if test="userNickname != null">#{userNickname},</if> |
||||
|
<if test="userAvatar != null">#{userAvatar},</if> |
||||
|
<if test="title != null and title != ''">#{title},</if> |
||||
|
<if test="content != null and content != ''">#{content},</if> |
||||
|
<if test="summary != null">#{summary},</if> |
||||
|
<if test="category != null">#{category},</if> |
||||
|
<if test="tags != null">#{tags},</if> |
||||
|
<if test="coverImage != null">#{coverImage},</if> |
||||
|
<if test="images != null">#{images},</if> |
||||
|
<if test="attachments != null">#{attachments},</if> |
||||
|
<if test="status != null">#{status},</if> |
||||
|
<if test="auditRemark != null">#{auditRemark},</if> |
||||
|
<if test="auditTime != null">#{auditTime},</if> |
||||
|
<if test="auditUserId != null">#{auditUserId},</if> |
||||
|
<if test="hasSensitive != null">#{hasSensitive},</if> |
||||
|
<if test="sensitiveWords != null">#{sensitiveWords},</if> |
||||
|
<if test="isHandled != null">#{isHandled},</if> |
||||
|
<if test="viewCount != null">#{viewCount},</if> |
||||
|
<if test="likeCount != null">#{likeCount},</if> |
||||
|
<if test="collectCount != null">#{collectCount},</if> |
||||
|
<if test="shareCount != null">#{shareCount},</if> |
||||
|
<if test="createdAt != null">#{createdAt},</if> |
||||
|
<if test="updatedAt != null">#{updatedAt},</if> |
||||
|
<if test="publishedAt != null">#{publishedAt},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateMuhuExperienceShare" parameterType="MuhuExperienceShare"> |
||||
|
update muhu_experience_share |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="userId != null">user_id = #{userId},</if> |
||||
|
<if test="username != null">username = #{username},</if> |
||||
|
<if test="userNickname != null">user_nickname = #{userNickname},</if> |
||||
|
<if test="userAvatar != null">user_avatar = #{userAvatar},</if> |
||||
|
<if test="title != null and title != ''">title = #{title},</if> |
||||
|
<if test="content != null and content != ''">content = #{content},</if> |
||||
|
<if test="summary != null">summary = #{summary},</if> |
||||
|
<if test="category != null">category = #{category},</if> |
||||
|
<if test="tags != null">tags = #{tags},</if> |
||||
|
<if test="coverImage != null">cover_image = #{coverImage},</if> |
||||
|
<if test="images != null">images = #{images},</if> |
||||
|
<if test="attachments != null">attachments = #{attachments},</if> |
||||
|
<if test="status != null">status = #{status},</if> |
||||
|
<if test="auditRemark != null">audit_remark = #{auditRemark},</if> |
||||
|
<if test="auditTime != null">audit_time = #{auditTime},</if> |
||||
|
<if test="auditUserId != null">audit_user_id = #{auditUserId},</if> |
||||
|
<if test="hasSensitive != null">has_sensitive = #{hasSensitive},</if> |
||||
|
<if test="sensitiveWords != null">sensitive_words = #{sensitiveWords},</if> |
||||
|
<if test="isHandled != null">is_handled = #{isHandled},</if> |
||||
|
<if test="viewCount != null">view_count = #{viewCount},</if> |
||||
|
<if test="likeCount != null">like_count = #{likeCount},</if> |
||||
|
<if test="collectCount != null">collect_count = #{collectCount},</if> |
||||
|
<if test="shareCount != null">share_count = #{shareCount},</if> |
||||
|
<if test="createdAt != null">created_at = #{createdAt},</if> |
||||
|
<if test="updatedAt != null">updated_at = #{updatedAt},</if> |
||||
|
<if test="publishedAt != null">published_at = #{publishedAt},</if> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteMuhuExperienceShareById" parameterType="Long"> |
||||
|
delete from muhu_experience_share where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteMuhuExperienceShareByIds" parameterType="String"> |
||||
|
delete from muhu_experience_share where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
||||
@ -0,0 +1,94 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.chenhai.system.mapper.SysAnswerAgainMapper"> |
||||
|
|
||||
|
<resultMap type="SysAnswerAgain" id="SysAnswerAgainResult"> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="answerId" column="answer_id" /> |
||||
|
<result property="userId" column="user_id" /> |
||||
|
<result property="username" column="username" /> |
||||
|
<result property="content" column="content" /> |
||||
|
<result property="createdAt" column="created_at" /> |
||||
|
<result property="updatedAt" column="updated_at" /> |
||||
|
<result property="nickName" column="nick_name" /> |
||||
|
<result property="avatar" column="avatar" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectSysAnswerAgainVo"> |
||||
|
select |
||||
|
a.id, |
||||
|
a.answer_id, |
||||
|
a.user_id, |
||||
|
a.username, |
||||
|
u.nick_name, |
||||
|
u.avatar, |
||||
|
a.content, |
||||
|
a.created_at, |
||||
|
a.updated_at |
||||
|
from sys_answer_again a |
||||
|
left join sys_user u on a.user_id = u.user_id |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectSysAnswerAgainList" parameterType="SysAnswerAgain" resultMap="SysAnswerAgainResult"> |
||||
|
<include refid="selectSysAnswerAgainVo"/> |
||||
|
<where> |
||||
|
<if test="answerId != null "> and answer_id = #{answerId}</if> |
||||
|
<if test="userId != null and userId != ''"> and user_id = #{userId}</if> |
||||
|
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if> |
||||
|
<if test="content != null and content != ''"> and content = #{content}</if> |
||||
|
<if test="createdAt != null "> and created_at = #{createdAt}</if> |
||||
|
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectSysAnswerAgainById" parameterType="Long" resultMap="SysAnswerAgainResult"> |
||||
|
<include refid="selectSysAnswerAgainVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertSysAnswerAgain" parameterType="SysAnswerAgain" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into sys_answer_again |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="answerId != null">answer_id,</if> |
||||
|
<if test="userId != null and userId != ''">user_id,</if> |
||||
|
<if test="username != null and username != ''">username,</if> |
||||
|
<if test="content != null and content != ''">content,</if> |
||||
|
<if test="createdAt != null">created_at,</if> |
||||
|
<if test="updatedAt != null">updated_at,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="answerId != null">#{answerId},</if> |
||||
|
<if test="userId != null and userId != ''">#{userId},</if> |
||||
|
<if test="username != null and username != ''">#{username},</if> |
||||
|
<if test="content != null and content != ''">#{content},</if> |
||||
|
<if test="createdAt != null">#{createdAt},</if> |
||||
|
<if test="updatedAt != null">#{updatedAt},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateSysAnswerAgain" parameterType="SysAnswerAgain"> |
||||
|
update sys_answer_again |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="answerId != null">answer_id = #{answerId},</if> |
||||
|
<if test="userId != null and userId != ''">user_id = #{userId},</if> |
||||
|
<if test="username != null and username != ''">username = #{username},</if> |
||||
|
<if test="content != null and content != ''">content = #{content},</if> |
||||
|
<if test="createdAt != null">created_at = #{createdAt},</if> |
||||
|
<if test="updatedAt != null">updated_at = #{updatedAt},</if> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteSysAnswerAgainById" parameterType="Long"> |
||||
|
delete from sys_answer_again where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteSysAnswerAgainByIds" parameterType="String"> |
||||
|
delete from sys_answer_again where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
||||
@ -0,0 +1,117 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.chenhai.system.mapper.SysMuhuUserMapper"> |
||||
|
|
||||
|
<resultMap type="SysMuhuUser" id="SysMuhuUserResult"> |
||||
|
<result property="userId" column="user_id" /> |
||||
|
<result property="realName" column="real_name" /> |
||||
|
<result property="idCard" column="id_card" /> |
||||
|
<result property="idCardFront" column="id_card_front" /> |
||||
|
<result property="idCardBack" column="id_card_back" /> |
||||
|
<result property="faceImage" column="face_image" /> |
||||
|
<result property="authStatus" column="auth_status" /> |
||||
|
<result property="authTime" column="auth_time" /> |
||||
|
<result property="authFailReason" column="auth_fail_reason" /> |
||||
|
<result property="securityQuestion" column="security_question" /> |
||||
|
<result property="securityAnswer" column="security_answer" /> |
||||
|
<result property="lastLoginTime" column="last_login_time" /> |
||||
|
<result property="lastLoginIp" column="last_login_ip" /> |
||||
|
<result property="updateTime" column="update_time" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectSysMuhuUserVo"> |
||||
|
select user_id, real_name, id_card, id_card_front, id_card_back, face_image, auth_status, auth_time, auth_fail_reason, security_question, security_answer, last_login_time, last_login_ip, update_time from sys_muhu_user |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectSysMuhuUserList" parameterType="SysMuhuUser" resultMap="SysMuhuUserResult"> |
||||
|
<include refid="selectSysMuhuUserVo"/> |
||||
|
<where> |
||||
|
<if test="realName != null and realName != ''"> and real_name like concat('%', #{realName}, '%')</if> |
||||
|
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if> |
||||
|
<if test="idCardFront != null and idCardFront != ''"> and id_card_front = #{idCardFront}</if> |
||||
|
<if test="idCardBack != null and idCardBack != ''"> and id_card_back = #{idCardBack}</if> |
||||
|
<if test="faceImage != null and faceImage != ''"> and face_image = #{faceImage}</if> |
||||
|
<if test="authStatus != null and authStatus != ''"> and auth_status = #{authStatus}</if> |
||||
|
<if test="authTime != null "> and auth_time = #{authTime}</if> |
||||
|
<if test="authFailReason != null and authFailReason != ''"> and auth_fail_reason = #{authFailReason}</if> |
||||
|
<if test="securityQuestion != null and securityQuestion != ''"> and security_question = #{securityQuestion}</if> |
||||
|
<if test="securityAnswer != null and securityAnswer != ''"> and security_answer = #{securityAnswer}</if> |
||||
|
<if test="lastLoginTime != null "> and last_login_time = #{lastLoginTime}</if> |
||||
|
<if test="lastLoginIp != null and lastLoginIp != ''"> and last_login_ip = #{lastLoginIp}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectSysMuhuUserByUserId" parameterType="Long" resultMap="SysMuhuUserResult"> |
||||
|
<include refid="selectSysMuhuUserVo"/> |
||||
|
where user_id = #{userId} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertSysMuhuUser" parameterType="SysMuhuUser"> |
||||
|
insert into sys_muhu_user |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="userId != null">user_id,</if> |
||||
|
<if test="realName != null">real_name,</if> |
||||
|
<if test="idCard != null">id_card,</if> |
||||
|
<if test="idCardFront != null">id_card_front,</if> |
||||
|
<if test="idCardBack != null">id_card_back,</if> |
||||
|
<if test="faceImage != null">face_image,</if> |
||||
|
<if test="authStatus != null">auth_status,</if> |
||||
|
<if test="authTime != null">auth_time,</if> |
||||
|
<if test="authFailReason != null">auth_fail_reason,</if> |
||||
|
<if test="securityQuestion != null">security_question,</if> |
||||
|
<if test="securityAnswer != null">security_answer,</if> |
||||
|
<if test="lastLoginTime != null">last_login_time,</if> |
||||
|
<if test="lastLoginIp != null">last_login_ip,</if> |
||||
|
<if test="updateTime != null">update_time,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="userId != null">#{userId},</if> |
||||
|
<if test="realName != null">#{realName},</if> |
||||
|
<if test="idCard != null">#{idCard},</if> |
||||
|
<if test="idCardFront != null">#{idCardFront},</if> |
||||
|
<if test="idCardBack != null">#{idCardBack},</if> |
||||
|
<if test="faceImage != null">#{faceImage},</if> |
||||
|
<if test="authStatus != null">#{authStatus},</if> |
||||
|
<if test="authTime != null">#{authTime},</if> |
||||
|
<if test="authFailReason != null">#{authFailReason},</if> |
||||
|
<if test="securityQuestion != null">#{securityQuestion},</if> |
||||
|
<if test="securityAnswer != null">#{securityAnswer},</if> |
||||
|
<if test="lastLoginTime != null">#{lastLoginTime},</if> |
||||
|
<if test="lastLoginIp != null">#{lastLoginIp},</if> |
||||
|
<if test="updateTime != null">#{updateTime},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateSysMuhuUser" parameterType="SysMuhuUser"> |
||||
|
update sys_muhu_user |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="realName != null">real_name = #{realName},</if> |
||||
|
<if test="idCard != null">id_card = #{idCard},</if> |
||||
|
<if test="idCardFront != null">id_card_front = #{idCardFront},</if> |
||||
|
<if test="idCardBack != null">id_card_back = #{idCardBack},</if> |
||||
|
<if test="faceImage != null">face_image = #{faceImage},</if> |
||||
|
<if test="authStatus != null">auth_status = #{authStatus},</if> |
||||
|
<if test="authTime != null">auth_time = #{authTime},</if> |
||||
|
<if test="authFailReason != null">auth_fail_reason = #{authFailReason},</if> |
||||
|
<if test="securityQuestion != null">security_question = #{securityQuestion},</if> |
||||
|
<if test="securityAnswer != null">security_answer = #{securityAnswer},</if> |
||||
|
<if test="lastLoginTime != null">last_login_time = #{lastLoginTime},</if> |
||||
|
<if test="lastLoginIp != null">last_login_ip = #{lastLoginIp},</if> |
||||
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
||||
|
</trim> |
||||
|
where user_id = #{userId} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteSysMuhuUserByUserId" parameterType="Long"> |
||||
|
delete from sys_muhu_user where user_id = #{userId} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteSysMuhuUserByUserIds" parameterType="String"> |
||||
|
delete from sys_muhu_user where user_id in |
||||
|
<foreach item="userId" collection="array" open="(" separator="," close=")"> |
||||
|
#{userId} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
||||
@ -0,0 +1,44 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询经验分享列表
|
||||
|
export function listShare(query) { |
||||
|
return request({ |
||||
|
url: '/muhu/share/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询经验分享详细
|
||||
|
export function getShare(id) { |
||||
|
return request({ |
||||
|
url: '/muhu/share/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增经验分享
|
||||
|
export function addShare(data) { |
||||
|
return request({ |
||||
|
url: '/muhu/share', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改经验分享
|
||||
|
export function updateShare(data) { |
||||
|
return request({ |
||||
|
url: '/muhu/share', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除经验分享
|
||||
|
export function delShare(id) { |
||||
|
return request({ |
||||
|
url: '/muhu/share/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询回复列表
|
||||
|
export function listAgain(query) { |
||||
|
return request({ |
||||
|
url: '/system/again/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询回复详细
|
||||
|
export function getAgain(id) { |
||||
|
return request({ |
||||
|
url: '/system/again/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增回复
|
||||
|
export function addAgain(data) { |
||||
|
return request({ |
||||
|
url: '/system/again', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改回复
|
||||
|
export function updateAgain(data) { |
||||
|
return request({ |
||||
|
url: '/system/again', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除回复
|
||||
|
export function delAgain(id) { |
||||
|
return request({ |
||||
|
url: '/system/again/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询牧户用户列表
|
||||
|
export function listMuhuuser(query) { |
||||
|
return request({ |
||||
|
url: '/system/muhuuser/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询牧户用户详细
|
||||
|
export function getMuhuuser(userId) { |
||||
|
return request({ |
||||
|
url: '/system/muhuuser/' + userId, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增牧户用户
|
||||
|
export function addMuhuuser(data) { |
||||
|
return request({ |
||||
|
url: '/system/muhuuser', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改牧户用户
|
||||
|
export function updateMuhuuser(data) { |
||||
|
return request({ |
||||
|
url: '/system/muhuuser', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除牧户用户
|
||||
|
export function delMuhuuser(userId) { |
||||
|
return request({ |
||||
|
url: '/system/muhuuser/' + userId, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1,440 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['muhu:share:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['muhu:share:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['muhu:share:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['muhu:share:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="shareList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="发布用户名" align="center" prop="username" /> |
||||
|
<el-table-column label="用户昵称" align="center" prop="userNickname" /> |
||||
|
<el-table-column label="用户头像" align="center" prop="userAvatar" /> |
||||
|
<el-table-column label="文章标题" align="center" prop="title" /> |
||||
|
<el-table-column label="文章内容" align="center" prop="content" /> |
||||
|
<el-table-column label="文章摘要" align="center" prop="summary" /> |
||||
|
<el-table-column label="分类" align="center" prop="category" /> |
||||
|
<el-table-column label="标签" align="center" prop="tags" /> |
||||
|
<el-table-column label="封面图片" align="center" prop="coverImage" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<image-preview :src="scope.row.coverImage" :width="50" :height="50"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="文章图片" align="center" prop="images" /> |
||||
|
<el-table-column label="附件" align="center" prop="attachments" /> |
||||
|
<el-table-column label="状态" align="center" prop="status" /> |
||||
|
<el-table-column label="审核备注" align="center" prop="auditRemark" /> |
||||
|
<el-table-column label="审核时间" align="center" prop="auditTime" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.auditTime, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="审核人ID" align="center" prop="auditUserId" /> |
||||
|
<el-table-column label="是否包含敏感词" align="center" prop="hasSensitive" /> |
||||
|
<el-table-column label="敏感词列表" align="center" prop="sensitiveWords" /> |
||||
|
<el-table-column label="是否已处理敏感词" align="center" prop="isHandled" /> |
||||
|
<el-table-column label="浏览次数" align="center" prop="viewCount" /> |
||||
|
<el-table-column label="点赞数" align="center" prop="likeCount" /> |
||||
|
<el-table-column label="收藏数" align="center" prop="collectCount" /> |
||||
|
<el-table-column label="分享数" align="center" prop="shareCount" /> |
||||
|
<el-table-column label="创建时间" align="center" prop="createdAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="更新时间" align="center" prop="updatedAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.updatedAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="发布时间" align="center" prop="publishedAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.publishedAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['muhu:share:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['muhu:share:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改经验分享对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="发布用户ID" prop="userId"> |
||||
|
<el-input v-model="form.userId" placeholder="请输入发布用户ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发布用户名" prop="username"> |
||||
|
<el-input v-model="form.username" placeholder="请输入发布用户名" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="用户昵称" prop="userNickname"> |
||||
|
<el-input v-model="form.userNickname" placeholder="请输入用户昵称" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="用户头像" prop="userAvatar"> |
||||
|
<el-input v-model="form.userAvatar" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="文章标题" prop="title"> |
||||
|
<el-input v-model="form.title" placeholder="请输入文章标题" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="文章内容"> |
||||
|
<editor v-model="form.content" :min-height="192"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="文章摘要" prop="summary"> |
||||
|
<el-input v-model="form.summary" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="分类" prop="category"> |
||||
|
<el-input v-model="form.category" placeholder="请输入分类" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="标签" prop="tags"> |
||||
|
<el-input v-model="form.tags" placeholder="请输入标签" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="封面图片" prop="coverImage"> |
||||
|
<image-upload v-model="form.coverImage"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="文章图片" prop="images"> |
||||
|
<el-input v-model="form.images" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="附件" prop="attachments"> |
||||
|
<el-input v-model="form.attachments" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核备注" prop="auditRemark"> |
||||
|
<el-input v-model="form.auditRemark" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核时间" prop="auditTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.auditTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择审核时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核人ID" prop="auditUserId"> |
||||
|
<el-input v-model="form.auditUserId" placeholder="请输入审核人ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否包含敏感词" prop="hasSensitive"> |
||||
|
<el-input v-model="form.hasSensitive" placeholder="请输入是否包含敏感词" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="敏感词列表" prop="sensitiveWords"> |
||||
|
<el-input v-model="form.sensitiveWords" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否已处理敏感词" prop="isHandled"> |
||||
|
<el-input v-model="form.isHandled" placeholder="请输入是否已处理敏感词" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="浏览次数" prop="viewCount"> |
||||
|
<el-input v-model="form.viewCount" placeholder="请输入浏览次数" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="点赞数" prop="likeCount"> |
||||
|
<el-input v-model="form.likeCount" placeholder="请输入点赞数" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="收藏数" prop="collectCount"> |
||||
|
<el-input v-model="form.collectCount" placeholder="请输入收藏数" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="分享数" prop="shareCount"> |
||||
|
<el-input v-model="form.shareCount" placeholder="请输入分享数" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择创建时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.updatedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择更新时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发布时间" prop="publishedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.publishedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择发布时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listShare, getShare, delShare, addShare, updateShare } from "@/api/muhu/share" |
||||
|
|
||||
|
export default { |
||||
|
name: "Share", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 经验分享表格数据 |
||||
|
shareList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
userId: null, |
||||
|
username: null, |
||||
|
userNickname: null, |
||||
|
userAvatar: null, |
||||
|
title: null, |
||||
|
content: null, |
||||
|
summary: null, |
||||
|
category: null, |
||||
|
tags: null, |
||||
|
coverImage: null, |
||||
|
images: null, |
||||
|
attachments: null, |
||||
|
status: null, |
||||
|
auditRemark: null, |
||||
|
auditTime: null, |
||||
|
auditUserId: null, |
||||
|
hasSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
isHandled: null, |
||||
|
viewCount: null, |
||||
|
likeCount: null, |
||||
|
collectCount: null, |
||||
|
shareCount: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null, |
||||
|
publishedAt: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
userId: [ |
||||
|
{ required: true, message: "发布用户ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
title: [ |
||||
|
{ required: true, message: "文章标题不能为空", trigger: "blur" } |
||||
|
], |
||||
|
content: [ |
||||
|
{ required: true, message: "文章内容不能为空", trigger: "blur" } |
||||
|
], |
||||
|
status: [ |
||||
|
{ required: true, message: "状态不能为空", trigger: "change" } |
||||
|
], |
||||
|
createdAt: [ |
||||
|
{ required: true, message: "创建时间不能为空", trigger: "blur" } |
||||
|
], |
||||
|
updatedAt: [ |
||||
|
{ required: true, message: "更新时间不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询经验分享列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listShare(this.queryParams).then(response => { |
||||
|
this.shareList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
userId: null, |
||||
|
username: null, |
||||
|
userNickname: null, |
||||
|
userAvatar: null, |
||||
|
title: null, |
||||
|
content: null, |
||||
|
summary: null, |
||||
|
category: null, |
||||
|
tags: null, |
||||
|
coverImage: null, |
||||
|
images: null, |
||||
|
attachments: null, |
||||
|
status: null, |
||||
|
auditRemark: null, |
||||
|
auditTime: null, |
||||
|
auditUserId: null, |
||||
|
hasSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
isHandled: null, |
||||
|
viewCount: null, |
||||
|
likeCount: null, |
||||
|
collectCount: null, |
||||
|
shareCount: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null, |
||||
|
publishedAt: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.id) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加经验分享" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const id = row.id || this.ids |
||||
|
getShare(id).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改经验分享" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.id != null) { |
||||
|
updateShare(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addShare(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids |
||||
|
this.$modal.confirm('是否确认删除经验分享编号为"' + ids + '"的数据项?').then(function() { |
||||
|
return delShare(ids) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('muhu/share/export', { |
||||
|
...this.queryParams |
||||
|
}, `share_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,275 @@ |
|||||
|
<!-- src/views/system/again/index.vue --> |
||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:again:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:again:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:again:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="againList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="对应的回复id" align="center" prop="answerId" /> |
||||
|
<el-table-column label="用户名" align="center" prop="nickName" /> |
||||
|
<el-table-column label="回复内容" align="center" prop="content" /> |
||||
|
<el-table-column label="创建时间" align="center" prop="createdAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:again:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:again:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改回复对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="回复内容"> |
||||
|
<editor v-model="form.content" :min-height="192"/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listAgain, getAgain, delAgain, addAgain, updateAgain } from "@/api/system/again" |
||||
|
|
||||
|
export default { |
||||
|
name: "Again", |
||||
|
// 添加 props 接收弹窗控制参数 |
||||
|
props: { |
||||
|
visible: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
answerId: { |
||||
|
type: [Number, String], |
||||
|
default: null |
||||
|
}, |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "回复管理" |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 回复表格数据 |
||||
|
againList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
answerId: this.answerId, // 使用prop传递的answerId |
||||
|
userId: null, |
||||
|
username: null, |
||||
|
content: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
content: [ |
||||
|
{ required: true, message: "回复内容不能为空", trigger: "blur" } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
// 监听 answerId prop 变化 |
||||
|
answerId: { |
||||
|
immediate: true, |
||||
|
handler(newVal) { |
||||
|
if (newVal) { |
||||
|
this.queryParams.answerId = newVal |
||||
|
this.getList() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// 如果有answerId,则获取数据 |
||||
|
if (this.answerId) { |
||||
|
this.getList() |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询回复列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listAgain(this.queryParams).then(response => { |
||||
|
this.againList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
answerId: this.answerId, // 设置当前answerId |
||||
|
userId: null, |
||||
|
username: null, |
||||
|
content: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.queryParams.answerId = this.answerId |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.id) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加回复" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const id = row.id || this.ids |
||||
|
getAgain(id).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改回复" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.id != null) { |
||||
|
updateAgain(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
this.$emit('refresh') |
||||
|
}) |
||||
|
} else { |
||||
|
addAgain(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
this.$emit('refresh') |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids |
||||
|
this.$modal.confirm('是否确认删除回复编号为"' + ids + '"的数据项?').then(function() { |
||||
|
return delAgain(ids) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
this.$emit('refresh') |
||||
|
}).catch(() => {}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,323 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:muhuuser:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:muhuuser:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:muhuuser:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:muhuuser:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="muhuuserList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="用户ID" align="center" prop="userId" /> |
||||
|
<el-table-column label="真实姓名" align="center" prop="realName" /> |
||||
|
<el-table-column label="身份证号" align="center" prop="idCard" /> |
||||
|
<el-table-column label="身份证正面照" align="center" prop="idCardFront" /> |
||||
|
<el-table-column label="身份证反面照" align="center" prop="idCardBack" /> |
||||
|
<el-table-column label="人脸识别照片" align="center" prop="faceImage" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<image-preview :src="scope.row.faceImage" :width="50" :height="50"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="认证状态" align="center" prop="authStatus" /> |
||||
|
<el-table-column label="认证时间" align="center" prop="authTime" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.authTime, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="认证失败原因" align="center" prop="authFailReason" /> |
||||
|
<el-table-column label="安全问题" align="center" prop="securityQuestion" /> |
||||
|
<el-table-column label="安全答案" align="center" prop="securityAnswer" /> |
||||
|
<el-table-column label="最后登录时间" align="center" prop="lastLoginTime" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.lastLoginTime, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="最后登录IP" align="center" prop="lastLoginIp" /> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:muhuuser:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:muhuuser:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改牧户用户对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="真实姓名" prop="realName"> |
||||
|
<el-input v-model="form.realName" placeholder="请输入真实姓名" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证号" prop="idCard"> |
||||
|
<el-input v-model="form.idCard" placeholder="请输入身份证号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证正面照" prop="idCardFront"> |
||||
|
<el-input v-model="form.idCardFront" placeholder="请输入身份证正面照" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证反面照" prop="idCardBack"> |
||||
|
<el-input v-model="form.idCardBack" placeholder="请输入身份证反面照" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="人脸识别照片" prop="faceImage"> |
||||
|
<image-upload v-model="form.faceImage"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="认证时间" prop="authTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.authTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择认证时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="认证失败原因" prop="authFailReason"> |
||||
|
<el-input v-model="form.authFailReason" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="安全问题" prop="securityQuestion"> |
||||
|
<el-input v-model="form.securityQuestion" placeholder="请输入安全问题" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="安全答案" prop="securityAnswer"> |
||||
|
<el-input v-model="form.securityAnswer" placeholder="请输入安全答案" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="最后登录时间" prop="lastLoginTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.lastLoginTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择最后登录时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="最后登录IP" prop="lastLoginIp"> |
||||
|
<el-input v-model="form.lastLoginIp" placeholder="请输入最后登录IP" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listMuhuuser, getMuhuuser, delMuhuuser, addMuhuuser, updateMuhuuser } from "@/api/system/muhuuser" |
||||
|
|
||||
|
export default { |
||||
|
name: "Muhuuser", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 牧户用户表格数据 |
||||
|
muhuuserList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
realName: null, |
||||
|
idCard: null, |
||||
|
idCardFront: null, |
||||
|
idCardBack: null, |
||||
|
faceImage: null, |
||||
|
authStatus: null, |
||||
|
authTime: null, |
||||
|
authFailReason: null, |
||||
|
securityQuestion: null, |
||||
|
securityAnswer: null, |
||||
|
lastLoginTime: null, |
||||
|
lastLoginIp: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询牧户用户列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listMuhuuser(this.queryParams).then(response => { |
||||
|
this.muhuuserList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
userId: null, |
||||
|
realName: null, |
||||
|
idCard: null, |
||||
|
idCardFront: null, |
||||
|
idCardBack: null, |
||||
|
faceImage: null, |
||||
|
authStatus: null, |
||||
|
authTime: null, |
||||
|
authFailReason: null, |
||||
|
securityQuestion: null, |
||||
|
securityAnswer: null, |
||||
|
lastLoginTime: null, |
||||
|
lastLoginIp: null, |
||||
|
updateTime: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.userId) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加牧户用户" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const userId = row.userId || this.ids |
||||
|
getMuhuuser(userId).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改牧户用户" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.userId != null) { |
||||
|
updateMuhuuser(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addMuhuuser(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const userIds = row.userId || this.ids |
||||
|
this.$modal.confirm('是否确认删除牧户用户编号为"' + userIds + '"的数据项?').then(function() { |
||||
|
return delMuhuuser(userIds) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/muhuuser/export', { |
||||
|
...this.queryParams |
||||
|
}, `muhuuser_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue