|
@@ -56,7 +56,6 @@ public class ApiTemplateController extends BaseController {
|
|
|
private ITbProfileImgService profileImgService;
|
|
|
@Autowired
|
|
|
private ITbAppUserService appUserService;
|
|
|
-
|
|
|
/**
|
|
|
* 查询个人页 图片列表
|
|
|
*/
|
|
@@ -64,11 +63,10 @@ public class ApiTemplateController extends BaseController {
|
|
|
@GetMapping("/allImg")
|
|
|
public AjaxResult allImg(TPersonalImg tPersonalImg) {
|
|
|
List<TPersonalImg> list = tPersonalImgService.list(new QueryWrapper<TPersonalImg>()
|
|
|
- .eq(StringUtils.isNotBlank(tPersonalImg.getEnable()), "enable", tPersonalImg.getEnable())
|
|
|
+ .eq(StringUtils.isNotBlank(tPersonalImg.getEnable()),"enable", tPersonalImg.getEnable())
|
|
|
);
|
|
|
return AjaxResult.success(list);
|
|
|
}
|
|
|
-
|
|
|
/**
|
|
|
* 获取个人页详细信息
|
|
|
*/
|
|
@@ -89,7 +87,7 @@ public class ApiTemplateController extends BaseController {
|
|
|
@GetMapping("/allModel")
|
|
|
public AjaxResult allModel() {
|
|
|
LambdaQueryWrapper<TPersonalModel> lqw = new LambdaQueryWrapper<TPersonalModel>();
|
|
|
- lqw.eq(TPersonalModel::getEnable, "0");
|
|
|
+ lqw.eq(TPersonalModel::getEnable ,"0");
|
|
|
List<TPersonalModel> list = modelService.list(lqw);
|
|
|
return AjaxResult.success(list);
|
|
|
}
|
|
@@ -101,8 +99,8 @@ public class ApiTemplateController extends BaseController {
|
|
|
@GetMapping("/getModel/{type}")
|
|
|
public AjaxResult getModel(@PathVariable("type") String type) {
|
|
|
LambdaQueryWrapper<TPersonalModel> lqw = new LambdaQueryWrapper<TPersonalModel>();
|
|
|
- lqw.eq(TPersonalModel::getEnable, "0");
|
|
|
- lqw.eq(TPersonalModel::getType, type);
|
|
|
+ lqw.eq(TPersonalModel::getEnable ,"0");
|
|
|
+ lqw.eq(TPersonalModel::getType,type);
|
|
|
List<TPersonalModel> list = modelService.list(lqw);
|
|
|
return AjaxResult.success(list);
|
|
|
}
|
|
@@ -114,13 +112,13 @@ public class ApiTemplateController extends BaseController {
|
|
|
@ApiOperation("新增个人页留言内容")
|
|
|
@PostMapping("/addMessage")
|
|
|
public AjaxResult add(@RequestBody TPersonalMessage tPersonalMessage) {
|
|
|
- if (tPersonalMessage.getPersonalId() == null) {
|
|
|
+ if (tPersonalMessage.getPersonalId() == null){
|
|
|
return AjaxResult.error("个人id不能为空");
|
|
|
}
|
|
|
- if (StringUtils.isBlank(tPersonalMessage.getName())) {
|
|
|
+ if (StringUtils.isBlank(tPersonalMessage.getName())){
|
|
|
return AjaxResult.error("姓名不能为空");
|
|
|
}
|
|
|
- if (StringUtils.isBlank(tPersonalMessage.getContents())) {
|
|
|
+ if (StringUtils.isBlank(tPersonalMessage.getContents())){
|
|
|
return AjaxResult.error("留言不能为空");
|
|
|
}
|
|
|
tPersonalMessage.setCreateTime(new Date());
|
|
@@ -132,7 +130,7 @@ public class ApiTemplateController extends BaseController {
|
|
|
*/
|
|
|
@ApiOperation("查询个人页留言内容列表")
|
|
|
@GetMapping("/messageList")
|
|
|
- public TableDataInfo list(Integer pageNum, Integer pageSize, Long personalId) {
|
|
|
+ public TableDataInfo list(Integer pageNum,Integer pageSize,Long personalId) {
|
|
|
if (personalId == null) {
|
|
|
return new TableDataInfo();
|
|
|
}
|
|
@@ -142,7 +140,7 @@ public class ApiTemplateController extends BaseController {
|
|
|
PageHelper.startPage(pageNum, pageSize, "create_time desc");
|
|
|
|
|
|
LambdaQueryWrapper<TPersonalMessage> lqw = new LambdaQueryWrapper<>();
|
|
|
- lqw.eq(TPersonalMessage::getPersonalId, personalId);
|
|
|
+ lqw.eq(TPersonalMessage::getPersonalId , personalId);
|
|
|
List<TPersonalMessage> list = messageService.list(lqw);
|
|
|
return getDataTable(list);
|
|
|
}
|