This commit is contained in:
Administrator 2020-09-13 22:09:38 +08:00
parent b31846bb3d
commit 55331693c8
7 changed files with 53 additions and 3 deletions

View File

@ -1,6 +1,8 @@
package com.ruoyi.business.controller;
import java.util.List;
import com.ruoyi.common.utils.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -112,6 +114,21 @@ public class BizMemberController extends BaseController
return toAjax(bizMemberService.updateBizMember(bizMember));
}
/**
* 修改会员密码
*/
@RequiresPermissions("business:member:edit")
@Log(title = "会员密码", businessType = BusinessType.UPDATE)
@PostMapping("/editPassword")
@ResponseBody
public AjaxResult editPassword(Long memberID, String password)
{
BizMember bizMember = bizMemberService.selectBizMemberSimple(memberID);
if(bizMember == null || StringUtils.isEmpty(password)) return toAjax(0);
bizMember.setPassword(password);
return toAjax(bizMemberService.updateBizMember(bizMember));
}
/**
* 删除会员
*/

View File

@ -119,7 +119,7 @@ public class BizOrderController extends BaseController
* 订单发货
*/
@RequiresPermissions("business:order:edit")
@Log(title = "订单", businessType = BusinessType.UPDATE)
@Log(title = "订单发货", businessType = BusinessType.UPDATE)
@PostMapping("/deliver")
@ResponseBody
public AjaxResult editDeliver(Long orderID)
@ -131,7 +131,7 @@ public class BizOrderController extends BaseController
* 订单修改地址/备注
*/
@RequiresPermissions("business:order:edit")
@Log(title = "订单", businessType = BusinessType.UPDATE)
@Log(title = "订单修改地址/备注", businessType = BusinessType.UPDATE)
@PostMapping("/updateAddressOrRemark")
@ResponseBody
public AjaxResult updateAddressOrRemark(Long orderID, String content, Integer type)

View File

@ -138,7 +138,7 @@ public class BizProductController extends BaseController
* 上架下架产品
*/
@RequiresPermissions("business:product:edit")
@Log(title = "产品", businessType = BusinessType.UPDATE)
@Log(title = "产品状态", businessType = BusinessType.UPDATE)
@PostMapping("/status")
@ResponseBody
public AjaxResult editStatus(@PathVariable(value = "productId", required = true) Long productID)

View File

@ -19,6 +19,14 @@ public interface BizMemberMapper
*/
public BizMember selectBizMemberById(Long id);
/**
* 查询会员
*
* @param id 会员ID
* @return 会员
*/
public BizMember selectBizMemberSimple(Long id);
/**
* 查询会员列表
*

View File

@ -19,6 +19,14 @@ public interface IBizMemberService
*/
public BizMember selectBizMemberById(Long id);
/**
* 查询会员
*
* @param id 会员ID
* @return 会员
*/
public BizMember selectBizMemberSimple(Long id);
/**
* 查询会员列表
*

View File

@ -33,6 +33,18 @@ public class BizMemberServiceImpl implements IBizMemberService
return bizMemberMapper.selectBizMemberById(id);
}
/**
* 查询会员
*
* @param id 会员ID
* @return 会员
*/
@Override
public BizMember selectBizMemberSimple(Long id)
{
return bizMemberMapper.selectBizMemberSimple(id);
}
/**
* 查询会员列表
*

View File

@ -44,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where a.id = #{id}
</select>
<select id="selectBizMemberSimple" parameterType="Long" resultMap="BizMemberResult">
select a.id, mobile, member_name, recommend_id, recommend_mobile, recommend_name, member_type, is_delete, is_enable, create_by, create_time, update_by, update_time,
where a.id = #{id}
</select>
<insert id="insertBizMember" parameterType="BizMember" useGeneratedKeys="true" keyProperty="id">
insert into biz_member
<trim prefix="(" suffix=")" suffixOverrides=",">