update 会员组

This commit is contained in:
2024-01-02 16:00:33 +08:00
parent 61ad9a9c46
commit 946325120d
3 changed files with 29 additions and 14 deletions

View File

@@ -2,20 +2,21 @@ package com.jsowell.pile.mapper;
import com.jsowell.pile.domain.MemberGroup; import com.jsowell.pile.domain.MemberGroup;
import com.jsowell.pile.vo.web.MemberGroupVO; import com.jsowell.pile.vo.web.MemberGroupVO;
import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
/** /**
* 会员组Mapper接口 * 会员组Mapper接口
* *
* @author jsowell * @author jsowell
* @date 2023-12-26 * @date 2023-12-26
*/ */
public interface MemberGroupMapper @Repository
{ public interface MemberGroupMapper {
/** /**
* 查询会员组 * 查询会员组
* *
* @param id 会员组主键 * @param id 会员组主键
* @return 会员组 * @return 会员组
*/ */
@@ -23,7 +24,7 @@ public interface MemberGroupMapper
/** /**
* 查询会员组列表 * 查询会员组列表
* *
* @param memberGroup 会员组 * @param memberGroup 会员组
* @return 会员组集合 * @return 会员组集合
*/ */
@@ -31,7 +32,7 @@ public interface MemberGroupMapper
/** /**
* 新增会员组 * 新增会员组
* *
* @param memberGroup 会员组 * @param memberGroup 会员组
* @return 结果 * @return 结果
*/ */
@@ -39,7 +40,7 @@ public interface MemberGroupMapper
/** /**
* 修改会员组 * 修改会员组
* *
* @param memberGroup 会员组 * @param memberGroup 会员组
* @return 结果 * @return 结果
*/ */
@@ -47,7 +48,7 @@ public interface MemberGroupMapper
/** /**
* 删除会员组 * 删除会员组
* *
* @param id 会员组主键 * @param id 会员组主键
* @return 结果 * @return 结果
*/ */
@@ -55,7 +56,7 @@ public interface MemberGroupMapper
/** /**
* 批量删除会员组 * 批量删除会员组
* *
* @param ids 需要删除的数据主键集合 * @param ids 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */

View File

@@ -2,11 +2,13 @@ package com.jsowell.pile.service.impl;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.jsowell.common.util.DateUtils; import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.SecurityUtils;
import com.jsowell.common.util.id.IdUtils; import com.jsowell.common.util.id.IdUtils;
import com.jsowell.pile.domain.MemberGroup; import com.jsowell.pile.domain.MemberGroup;
import com.jsowell.pile.mapper.MemberGroupMapper; import com.jsowell.pile.mapper.MemberGroupMapper;
import com.jsowell.pile.service.MemberGroupService; import com.jsowell.pile.service.MemberGroupService;
import com.jsowell.pile.vo.web.MemberGroupVO; import com.jsowell.pile.vo.web.MemberGroupVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -19,6 +21,7 @@ import java.util.List;
* @author jsowell * @author jsowell
* @date 2023-12-26 * @date 2023-12-26
*/ */
@Slf4j
@Service @Service
public class MemberGroupServiceImpl implements MemberGroupService { public class MemberGroupServiceImpl implements MemberGroupService {
@Autowired @Autowired
@@ -61,6 +64,12 @@ public class MemberGroupServiceImpl implements MemberGroupService {
// 生成编号 // 生成编号
memberGroup.setGroupCode(generateGroupCode()); memberGroup.setGroupCode(generateGroupCode());
memberGroup.setCreateTime(DateUtils.getNowDate()); memberGroup.setCreateTime(DateUtils.getNowDate());
try {
String createBy = SecurityUtils.getLoginUser().getUsername();
memberGroup.setCreateBy(createBy);
} catch (Exception e) {
}
return memberGroupMapper.insertMemberGroup(memberGroup); return memberGroupMapper.insertMemberGroup(memberGroup);
} }

View File

@@ -163,9 +163,14 @@
:value="station.id" /> :value="station.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--<el-form-item label="会员组等级" prop="groupLevel"> <el-form-item label="折扣类型" prop="groupType">
<el-input v-model="form.groupLevel" placeholder="请输入会员组等级" /> <el-radio-group v-model="form.groupType">
</el-form-item>--> <el-radio v-for="item in dict.type.group_type"
:key="item.value" :label="item.value">
{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="折扣率" prop="discount"> <el-form-item label="折扣率" prop="discount">
<el-input v-model="form.discount" placeholder="请输入折扣率" /> <el-input v-model="form.discount" placeholder="请输入折扣率" />
</el-form-item> </el-form-item>
@@ -301,7 +306,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加会员组"; this.title = "添加集团";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@@ -310,7 +315,7 @@ export default {
getMemberGroup(id).then(response => { getMemberGroup(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改会员组"; this.title = "修改集团";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */