main
parent
cbdb6e8afe
commit
a7f9e22c50
|
|
@ -80,20 +80,16 @@ public class AppLoginController {
|
|||
|
||||
if (StringUtils.isNotEmpty(registerForm.getEmail())) {
|
||||
//校验邮箱格式
|
||||
Assert.isTrue(MailUtil.validEmail(registerForm.getEmail()), "邮箱格式不正确") ;
|
||||
|
||||
//校验邮箱是否已注册
|
||||
// Assert.isTrue(MailUtil.validEmail(registerForm.getEmail()), "邮箱格式不正确") ;
|
||||
AppRegister appRegister = setAppRegister(registerForm);
|
||||
//校验邮箱是否已注册
|
||||
AppUser emailUser = appUserService.selectAppUserByEmail(registerForm.getEmail());
|
||||
Assert.isNull(emailUser, "邮箱已注册");
|
||||
AppRegister appRegister = setAppRegister(registerForm);
|
||||
redisService.setCacheMapValue(IdUtils.fastUUID(),register.getEmail() , appRegister);
|
||||
appRegisterService.insertAppRegister(register);
|
||||
|
||||
Assert.isNull(emailUser, "邮箱已注册");
|
||||
redisService.setCacheMapValue(IdUtils.fastUUID(),registerForm.getEmail() , registerForm);
|
||||
try {
|
||||
String EM = "<html><body><h2>欢迎来到我们的服务!!</h2>"
|
||||
+ "<p>请点击下面的网址确认您的注册:</p>"
|
||||
+ "<p>http://localhost:9204/app/activation/"+ IdUtils.fastUUID() + "/" + register.getEmail() + "</p>"
|
||||
+ "<p>http://101.133.172.2:9204/app/activation/"+ IdUtils.fastUUID() + "/" + registerForm.getEmail() + "</p>"
|
||||
+ "</body></html>";
|
||||
|
||||
MailUtil.send_mail(registerForm.getEmail(), EM);
|
||||
|
|
@ -111,15 +107,15 @@ public class AppLoginController {
|
|||
case 1:
|
||||
return R.fail(201, "您的账号已通过");
|
||||
case 2:
|
||||
return R.fail(201, "注册失败,您的账号已被驳回!");
|
||||
appRegisterService.updateAppRegisterByPhone(register);
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
AppRegister appRegister = setAppRegister(registerForm);
|
||||
appRegister.setInvitationCode(registerForm.getInvitationCode());
|
||||
int i = appRegisterService.insertAppRegister(appRegister);
|
||||
Assert.isTrue(i > 0, "注册失败");
|
||||
}
|
||||
AppRegister appRegister = setAppRegister(registerForm);
|
||||
appRegister.setInvitationCode(registerForm.getInvitationCode());
|
||||
int i = appRegisterService.insertAppRegister(appRegister);
|
||||
|
||||
|
||||
Assert.isTrue(i > 0, "注册失败");
|
||||
}
|
||||
return R.ok(null, "申请成功,请等待审核结果!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,118 @@
|
|||
package com.ruoyi.app.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.app.domain.vo.AppSkillVo;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.app.domain.AppSkill;
|
||||
import com.ruoyi.app.service.IAppSkillService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 标签信息Controller
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/app/skill")
|
||||
@Api(tags = "标签信息" , description = "标签信息")
|
||||
public class AppSkillController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppSkillService appSkillService;
|
||||
|
||||
/**
|
||||
* 查询标签信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value = "查询标签信息", notes = "查询标签信息", httpMethod = "GET")
|
||||
public TableDataInfo list(AppSkill appSkill)
|
||||
{
|
||||
startPage();
|
||||
List<AppSkill> list = appSkillService.selectAppSkillList(appSkill);
|
||||
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/list/tree")
|
||||
@ApiOperation(value = "查询标签信息", notes = "查询标签信息", httpMethod = "GET")
|
||||
public AjaxResult listTree(AppSkill appSkill)
|
||||
{
|
||||
List<AppSkillVo> list = appSkillService.selectAppSkillTreeList(appSkill);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出标签信息列表
|
||||
*/
|
||||
@Log(title = "标签信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AppSkill appSkill)
|
||||
{
|
||||
List<AppSkill> list = appSkillService.selectAppSkillList(appSkill);
|
||||
ExcelUtil<AppSkill> util = new ExcelUtil<AppSkill>(AppSkill.class);
|
||||
util.exportExcel(response, list, "标签信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取标签信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation(value = "获取标签信息详细信息", notes = "获取标签信息详细信息", httpMethod = "GET")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(appSkillService.selectAppSkillById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增标签信息
|
||||
*/
|
||||
@ApiOperation(value = "新增标签信息", notes = "新增标签信息", httpMethod = "POST")
|
||||
@Log(title = "标签信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody AppSkill appSkill)
|
||||
{
|
||||
return toAjax(appSkillService.insertAppSkill(appSkill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改标签信息
|
||||
*/
|
||||
@ApiOperation(value = "修改标签信息", notes = "修改标签信息", httpMethod = "PUT")
|
||||
@Log(title = "标签信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody AppSkill appSkill)
|
||||
{
|
||||
return toAjax(appSkillService.updateAppSkill(appSkill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除标签信息
|
||||
*/
|
||||
@Log(title = "标签信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appSkillService.deleteAppSkillByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -54,6 +54,8 @@ public class AppTopicController extends BaseController
|
|||
return success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/topicList")
|
||||
@ApiOperation(value = "组装过查询话题信息列表", notes = "组装过查询话题信息列表", httpMethod = "GET")
|
||||
public TableDataInfo topicList(AppTopic appTopic)
|
||||
|
|
@ -90,7 +92,6 @@ public class AppTopicController extends BaseController
|
|||
/**
|
||||
* 新增话题信息
|
||||
*/
|
||||
@RequiresPermissions("app:topic:add")
|
||||
@Log(title = "话题信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/add")
|
||||
@ApiOperation(value = "新增话题信息", notes = "新增话题信息", httpMethod = "POST")
|
||||
|
|
@ -102,7 +103,6 @@ public class AppTopicController extends BaseController
|
|||
/**
|
||||
* 修改话题信息
|
||||
*/
|
||||
@RequiresPermissions("app:topic:edit")
|
||||
@Log(title = "话题信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping(value = "/edit")
|
||||
@ApiOperation(value = "修改话题信息", notes = "修改话题信息", httpMethod = "PUT")
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ public class PayController extends BaseController
|
|||
AlipayTradeAppPayResponse result = null;
|
||||
try {
|
||||
//result = alipayService.startPay(orderNo,appOrderArg.getPrice(),appOrderArg.getLevel() == 2 ? 30 : (appOrderArg.getLevel() == 3 ? 365 : 0));
|
||||
result = alipayService.startPay(orderNo,appOrderArg.getPrice(),1);
|
||||
result = alipayService.startPay(orderNo,appOrderArg.getPrice(),0);
|
||||
} catch (AlipayApiException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
package com.ruoyi.app.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 标签信息对象 app_skill
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
public class AppSkill extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 话题id */
|
||||
private Long id;
|
||||
|
||||
/** 标签内容 */
|
||||
@Excel(name = "标签内容")
|
||||
private String name;
|
||||
|
||||
/** 父级id */
|
||||
@Excel(name = "父级id")
|
||||
private Long parentId;
|
||||
|
||||
/** 类型:0-标签分类,1-标签内容 */
|
||||
/** 类型:0-话题分类,1-话题数据 */
|
||||
@Excel(name = "类型:0-话题分类,1-话题数据")
|
||||
private String type;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setParentId(Long parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Long getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("remark", getRemark())
|
||||
.append("parentId", getParentId())
|
||||
.append("type", getType())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.ruoyi.app.domain.vo;
|
||||
|
||||
import com.ruoyi.app.domain.AppSkill;
|
||||
import com.ruoyi.app.domain.AppTopic;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AppSkillVo extends AppSkill {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private List<AppSkill> children = new ArrayList<>();
|
||||
}
|
||||
|
|
@ -62,4 +62,6 @@ public interface AppRegisterMapper
|
|||
|
||||
AppRegister selectAppRegisterByphone(@Param("phoneNumber")
|
||||
String phoneNumber);
|
||||
|
||||
int updateAppRegisterByPhone(AppRegister appRegister);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.app.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppSkill;
|
||||
|
||||
/**
|
||||
* 标签信息Mapper接口
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
public interface AppSkillMapper
|
||||
{
|
||||
/**
|
||||
* 查询标签信息
|
||||
*
|
||||
* @param id 标签信息主键
|
||||
* @return 标签信息
|
||||
*/
|
||||
public AppSkill selectAppSkillById(Long id);
|
||||
|
||||
/**
|
||||
* 查询标签信息列表
|
||||
*
|
||||
* @param appSkill 标签信息
|
||||
* @return 标签信息集合
|
||||
*/
|
||||
public List<AppSkill> selectAppSkillList(AppSkill appSkill);
|
||||
|
||||
/**
|
||||
* 新增标签信息
|
||||
*
|
||||
* @param appSkill 标签信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppSkill(AppSkill appSkill);
|
||||
|
||||
/**
|
||||
* 修改标签信息
|
||||
*
|
||||
* @param appSkill 标签信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppSkill(AppSkill appSkill);
|
||||
|
||||
/**
|
||||
* 删除标签信息
|
||||
*
|
||||
* @param id 标签信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppSkillById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除标签信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppSkillByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ public interface AppUserMapper
|
|||
List<AppUserDataVo> selectList(AppUser appUser);
|
||||
|
||||
List<Long> listByOrderTime();
|
||||
void updateAppUserById(@Param("ids")List<Long> ids);
|
||||
void updateAppUserById();
|
||||
|
||||
List<AppUserInfoVo> listUser(AppUser appUser);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ public interface IAppRegisterService
|
|||
*/
|
||||
public int updateAppRegister(AppRegister appRegister);
|
||||
|
||||
public int updateAppRegisterByPhone(AppRegister appRegister);
|
||||
|
||||
/**
|
||||
* 批量删除注册审核
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
package com.ruoyi.app.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppSkill;
|
||||
import com.ruoyi.app.domain.vo.AppSkillVo;
|
||||
|
||||
/**
|
||||
* 标签信息Service接口
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
public interface IAppSkillService
|
||||
{
|
||||
/**
|
||||
* 查询标签信息
|
||||
*
|
||||
* @param id 标签信息主键
|
||||
* @return 标签信息
|
||||
*/
|
||||
public AppSkill selectAppSkillById(Long id);
|
||||
|
||||
/**
|
||||
* 查询标签信息列表
|
||||
*
|
||||
* @param appSkill 标签信息
|
||||
* @return 标签信息集合
|
||||
*/
|
||||
public List<AppSkill> selectAppSkillList(AppSkill appSkill);
|
||||
|
||||
/**
|
||||
* 新增标签信息
|
||||
*
|
||||
* @param appSkill 标签信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppSkill(AppSkill appSkill);
|
||||
|
||||
/**
|
||||
* 修改标签信息
|
||||
*
|
||||
* @param appSkill 标签信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppSkill(AppSkill appSkill);
|
||||
|
||||
/**
|
||||
* 批量删除标签信息
|
||||
*
|
||||
* @param ids 需要删除的标签信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppSkillByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除标签信息信息
|
||||
*
|
||||
* @param id 标签信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppSkillById(Long id);
|
||||
|
||||
List<AppSkillVo> selectAppSkillTreeList(AppSkill appSkill);
|
||||
|
||||
}
|
||||
|
|
@ -14,9 +14,10 @@ public class ScheduledService {
|
|||
|
||||
@Scheduled(cron = "0/5 * * * * *")
|
||||
public void updateUserMember(){
|
||||
List<Long> ids = appUserMapper.listByOrderTime();
|
||||
appUserMapper.updateAppUserById();
|
||||
/*List<Long> ids = appUserMapper.listByOrderTime();
|
||||
if (ids != null && ids.size() > 0) {
|
||||
appUserMapper.updateAppUserById(ids);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,6 +101,12 @@ public class AppRegisterServiceImpl implements IAppRegisterService
|
|||
return appRegisterMapper.updateAppRegister(appRegister);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateAppRegisterByPhone(AppRegister appRegister) {
|
||||
appRegister.setUpdateTime(DateUtils.getNowDate());
|
||||
return appRegisterMapper.updateAppRegisterByPhone(appRegister);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除注册审核
|
||||
*
|
||||
|
|
@ -167,7 +173,7 @@ public class AppRegisterServiceImpl implements IAppRegisterService
|
|||
String email = "653809315@qq.com";
|
||||
String EM = "<html><body><h2>欢迎来到我们的服务!!</h2>"
|
||||
+ "<p>请点击下面的网址确认您的注册:</p>"
|
||||
+ "<p>http://localhost:9204/app/activation/"+ token + "/" + email + "</p>"
|
||||
+ "<p>http://101.133.172.2:9204/app/activation/"+ token + "/" + email + "</p>"
|
||||
+ "</body></html>";
|
||||
try {
|
||||
MailUtil.send_mail( "653809315@qq.com",EM);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,120 @@
|
|||
package com.ruoyi.app.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ruoyi.app.domain.AppTopic;
|
||||
import com.ruoyi.app.domain.vo.AppSkillVo;
|
||||
import com.ruoyi.app.domain.vo.AppTopicVo;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.app.mapper.AppSkillMapper;
|
||||
import com.ruoyi.app.domain.AppSkill;
|
||||
import com.ruoyi.app.service.IAppSkillService;
|
||||
|
||||
/**
|
||||
* 标签信息Service业务层处理
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-05-24
|
||||
*/
|
||||
@Service
|
||||
public class AppSkillServiceImpl implements IAppSkillService
|
||||
{
|
||||
@Autowired
|
||||
private AppSkillMapper appSkillMapper;
|
||||
|
||||
/**
|
||||
* 查询标签信息
|
||||
*
|
||||
* @param id 标签信息主键
|
||||
* @return 标签信息
|
||||
*/
|
||||
@Override
|
||||
public AppSkill selectAppSkillById(Long id)
|
||||
{
|
||||
return appSkillMapper.selectAppSkillById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签信息列表
|
||||
*
|
||||
* @param appSkill 标签信息
|
||||
* @return 标签信息
|
||||
*/
|
||||
@Override
|
||||
public List<AppSkill> selectAppSkillList(AppSkill appSkill)
|
||||
{
|
||||
return appSkillMapper.selectAppSkillList(appSkill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增标签信息
|
||||
*
|
||||
* @param appSkill 标签信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAppSkill(AppSkill appSkill)
|
||||
{
|
||||
appSkill.setCreateTime(DateUtils.getNowDate());
|
||||
return appSkillMapper.insertAppSkill(appSkill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改标签信息
|
||||
*
|
||||
* @param appSkill 标签信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAppSkill(AppSkill appSkill)
|
||||
{
|
||||
appSkill.setUpdateTime(DateUtils.getNowDate());
|
||||
return appSkillMapper.updateAppSkill(appSkill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除标签信息
|
||||
*
|
||||
* @param ids 需要删除的标签信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppSkillByIds(Long[] ids)
|
||||
{
|
||||
return appSkillMapper.deleteAppSkillByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除标签信息信息
|
||||
*
|
||||
* @param id 标签信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppSkillById(Long id)
|
||||
{
|
||||
return appSkillMapper.deleteAppSkillById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppSkillVo> selectAppSkillTreeList(AppSkill appSkill) {
|
||||
appSkill.setType("0");
|
||||
List<AppSkill> list = appSkillMapper.selectAppSkillList(appSkill);
|
||||
List<AppSkillVo> appSkillVos = new ArrayList<>();
|
||||
for (AppSkill skill : list) {
|
||||
AppSkillVo appSkillVo = new AppSkillVo();
|
||||
BeanUtils.copyProperties(skill,appSkillVo);
|
||||
skill = new AppSkill();
|
||||
skill.setParentId(appSkillVo.getId());
|
||||
appSkillVo.setChildren(appSkillMapper.selectAppSkillList(skill));
|
||||
appSkillVos.add(appSkillVo);
|
||||
}
|
||||
return appSkillVos;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -121,4 +121,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectAppRegisterByphone" resultType="com.ruoyi.app.domain.AppRegister">
|
||||
select * from app_register where phone = #{phoneNumber}
|
||||
</select>
|
||||
|
||||
<update id="updateAppRegisterByPhone">
|
||||
update app_register
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">updateBy = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="username != null">username = #{username},</if>
|
||||
<if test="prove != null">prove = #{prove},</if>
|
||||
<if test="avatarUrl != null">avatar_url = #{avatarUrl},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="schoolId != null">school_id = #{schoolId},</if>
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="invitationCode != null">invitation_code = #{invitationCode},</if>
|
||||
status = 0,
|
||||
</trim>
|
||||
where phone = #{phone}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<?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.ruoyi.app.mapper.AppSkillMapper">
|
||||
|
||||
<resultMap type="AppSkill" id="AppSkillResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="updateBy" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="type" column="type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppSkillVo">
|
||||
select id, name, create_time, update_time, create_by, updateBy, remark, parent_id, type from app_skill
|
||||
</sql>
|
||||
|
||||
<select id="selectAppSkillList" parameterType="AppSkill" resultMap="AppSkillResult">
|
||||
<include refid="selectAppSkillVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppSkillById" parameterType="Long" resultMap="AppSkillResult">
|
||||
<include refid="selectAppSkillVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppSkill" parameterType="AppSkill" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into app_skill
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">updateBy,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="type != null">type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAppSkill" parameterType="AppSkill">
|
||||
update app_skill
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">updateBy = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAppSkillById" parameterType="Long">
|
||||
delete from app_skill where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppSkillByIds" parameterType="String">
|
||||
delete from app_skill where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -211,12 +211,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updateAppUserById" parameterType="java.lang.Long">
|
||||
<update id="updateAppUserById">
|
||||
update app_user set is_member = 1,update_time = now()
|
||||
where id in
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
where
|
||||
is_member = 0
|
||||
and now() > order_end_time
|
||||
</update>
|
||||
|
||||
<insert id="insertAppUser" parameterType="AppUser" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
@ -339,7 +338,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="hobby != null">hobby = #{hobby},</if>
|
||||
<if test="city != null">city = #{city},</if>
|
||||
<if test="other != null">other = #{other},</if>
|
||||
<if test="isMember != null">is_member = #{isMember},</if>
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="orderStartTime != null">order_start_time = #{orderStartTime},</if>
|
||||
<if test="orderEndTime != null">order_end_time = #{orderEndTime},</if>
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public class SysProfileController extends BaseController
|
|||
return error("文件服务异常,请联系管理员");
|
||||
}
|
||||
String url = fileResult.getData().getUrl();
|
||||
if (userService.updateUserAvatar(loginUser.getUsername(), url))
|
||||
if (userService.updateUserAvatar(loginUser.getSysUser().getUserName(), url))
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("imgUrl", url);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询标签信息列表
|
||||
export function listSkill(query) {
|
||||
return request({
|
||||
url: '/app/skill/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询标签信息详细
|
||||
export function getSkill(id) {
|
||||
return request({
|
||||
url: '/app/skill/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增标签信息
|
||||
export function addSkill(data) {
|
||||
return request({
|
||||
url: '/app/skill',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改标签信息
|
||||
export function updateSkill(data) {
|
||||
return request({
|
||||
url: '/app/skill',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除标签信息
|
||||
export function delSkill(id) {
|
||||
return request({
|
||||
url: '/app/skill/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
|
@ -9,6 +9,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱域名" prop="email">
|
||||
<el-input
|
||||
v-model="queryParams.email"
|
||||
placeholder="请输入邮箱域名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
style="width: 200px"
|
||||
/></el-form-item>
|
||||
<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>
|
||||
|
|
@ -169,6 +177,8 @@ export default {
|
|||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
email: null,
|
||||
schoolImg : null,
|
||||
createTime: null,
|
||||
updateTime: null
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,281 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="标签内容" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入标签内容"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新人" prop="updateBy">
|
||||
<el-input
|
||||
v-model="queryParams.updateBy"
|
||||
placeholder="请输入更新人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="父级id" prop="parentId">
|
||||
<el-input
|
||||
v-model="queryParams.parentId"
|
||||
placeholder="请输入父级id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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="['app:skill: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="['app:skill: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="['app:skill: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="['app:skill:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="skillList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="话题id" align="center" prop="id" />
|
||||
<el-table-column label="标签内容" align="center" prop="name" />
|
||||
<el-table-column label="更新人" align="center" prop="updateBy" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="父级id" align="center" prop="parentId" />
|
||||
<el-table-column label="类型:0-标签分类,1-标签内容" align="center" prop="type" />
|
||||
<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="['app:skill:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['app:skill: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="name">
|
||||
<el-input v-model="form.name" placeholder="请输入标签内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="父级id" prop="parentId">
|
||||
<el-input v-model="form.parentId" placeholder="请输入父级id" />
|
||||
</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 { listSkill, getSkill, delSkill, addSkill, updateSkill } from "@/api/app/skill";
|
||||
|
||||
export default {
|
||||
name: "Skill",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 标签信息表格数据
|
||||
skillList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
updateBy: null,
|
||||
parentId: null,
|
||||
type: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询标签信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSkill(this.queryParams).then(response => {
|
||||
this.skillList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
createBy: null,
|
||||
updateBy: null,
|
||||
remark: null,
|
||||
parentId: null,
|
||||
type: 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
|
||||
getSkill(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) {
|
||||
updateSkill(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSkill(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 delSkill(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('app/skill/export', {
|
||||
...this.queryParams
|
||||
}, `skill_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue