Merge #111 into master from cc_20260417_bonus
fix:工资奖金 * cc_20260417_bonus: (28 commits squashed) - feat:工资奖金发放 - fix:工资奖金发放 - fix:工资奖金发放 - fix:工资奖金发放 - fix:工资奖金发放 - fix:门店实收相关接口 - fix:新品销售门店级接口 - fix:新品销售菜品列表接口;规则新增返回id - fix:新品销售菜品详情接口 - fix:新品销售菜品接口补充 - fix:小程序接口补充 - fix - fix:新增实收、新品销售测试接口 - fix:新增实收、新品销售测试接口 - fix - fix:新增门店菜品列表接口 - fix:同规则下无法新增相同菜品规则;新增小程序门店列表接口 - fix - fix:小程序用户获取来源修改 - fix:实收规则新增上月日均实收字段 - fix:规则限制 - fix:小程序上月日均实收 - fix:查询异常 - fix:查询异常 - fix:菜品员工明细字段赋值异常 - fix:排序 - fix:排序 - fix:员工实收列表新增门店筛选条件 Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/111
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
package com.cool.store.dao.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusDistributionRuleDO;
|
||||
import com.cool.store.mapper.bonus.BonusDistributionRuleMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 奖金发放规则DAO
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/4/20
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class BonusDistributionRuleDAO {
|
||||
private final BonusDistributionRuleMapper bonusDistributionRuleMapper;
|
||||
|
||||
public boolean addRule(BonusDistributionRuleDO ruleDO) {
|
||||
return bonusDistributionRuleMapper.insertSelective(ruleDO) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店下相同规则类型的启用规则生效期间有无交集
|
||||
* @param storeId 门店id
|
||||
* @param type 规则类型
|
||||
* @param startDate 开始有效日期
|
||||
* @param endDate 结束有效日期
|
||||
* @return 是否存在
|
||||
*/
|
||||
public boolean existOverlap(String storeId, Integer type, Date startDate, Date endDate) {
|
||||
return bonusDistributionRuleMapper.existOverlap(storeId, type, startDate, endDate) > 0;
|
||||
}
|
||||
|
||||
public BonusDistributionRuleDO getById(Long id) {
|
||||
return bonusDistributionRuleMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public boolean updateByPrimaryKeySelective(BonusDistributionRuleDO ruleDO) {
|
||||
return bonusDistributionRuleMapper.updateByPrimaryKeySelective(ruleDO) > 0;
|
||||
}
|
||||
|
||||
public List<BonusDistributionRuleDO> getList(String storeNumOrName, Integer type, Integer enable, String storeId) {
|
||||
return bonusDistributionRuleMapper.getList(storeNumOrName, type, enable, storeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定类型和生效月份的启用规则列表
|
||||
* @param type 规则类型
|
||||
* @param payMonth 发放月份 yyyy-MM
|
||||
* @return 规则列表
|
||||
*/
|
||||
public List<BonusDistributionRuleDO> getEnabledRulesByTypeAndMonth(Integer type, String payMonth) {
|
||||
return bonusDistributionRuleMapper.selectEnabledRulesByTypeAndMonth(type, payMonth);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.dao.bonus;
|
||||
|
||||
import com.alibaba.excel.util.CollectionUtils;
|
||||
import com.cool.store.entity.bonus.BonusEmployeeRewardDetailDO;
|
||||
import com.cool.store.mapper.bonus.BonusEmployeeRewardDetailMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 员工奖励明细DAO
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/4/21
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class BonusEmployeeRewardDetailDAO {
|
||||
private final BonusEmployeeRewardDetailMapper mapper;
|
||||
|
||||
public int insert(BonusEmployeeRewardDetailDO entity) {
|
||||
return mapper.insertSelective(entity);
|
||||
}
|
||||
|
||||
public int insertOrUpdateBatch(List<BonusEmployeeRewardDetailDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return 0;
|
||||
}
|
||||
return mapper.insertOrUpdateBatch(list);
|
||||
}
|
||||
|
||||
public List<BonusEmployeeRewardDetailDO> selectListByCondition(String storeNumOrName, Date startDate, Date endDate, String rewardUserName, String storeId) {
|
||||
return mapper.selectListByCondition(storeNumOrName, startDate, endDate, rewardUserName, storeId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.cool.store.dao.bonus;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.bonus.BonusNewProductEmployeeDO;
|
||||
import com.cool.store.mapper.bonus.BonusNewProductEmployeeMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 新品销售奖金-员工DAO
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/4/21
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class BonusNewProductEmployeeDAO {
|
||||
private final BonusNewProductEmployeeMapper mapper;
|
||||
|
||||
public int insert(BonusNewProductEmployeeDO entity) {
|
||||
return mapper.insertSelective(entity);
|
||||
}
|
||||
|
||||
public int insertBatch(List<BonusNewProductEmployeeDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return 0;
|
||||
}
|
||||
return mapper.insertBatch(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 月度奖金统计
|
||||
* @param storeId 门店id
|
||||
* @param payDate 发放年月
|
||||
* @param userIds 用户id列表
|
||||
* @return 实体列表
|
||||
*/
|
||||
public Map<String, BigDecimal> getMonthlyStatistics(String storeId, String payDate, List<String> userIds) {
|
||||
List<Map<String, Objects>> list = mapper.getMonthlyStatistics(storeId, payDate, userIds);
|
||||
return CollStreamUtil.toMap(list, v -> MapUtils.getString(v, "reward_user_id"), v -> new BigDecimal(MapUtils.getString(v, "total_amount")));
|
||||
}
|
||||
|
||||
/**
|
||||
* 月度统计
|
||||
*/
|
||||
public List<BonusNewProductEmployeeDO> monthlyStatistics(Long ruleId, String storeId, Date payDate, String userId) {
|
||||
return mapper.monthlyStatistics(ruleId, storeId, payDate, userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工列表月度统计
|
||||
*/
|
||||
public List<BonusNewProductEmployeeDO> employeeMonthlyStatistics(Date startDate,
|
||||
Date endDate,
|
||||
String storeNumOrName,
|
||||
String rewardUserName,
|
||||
String storeId) {
|
||||
return mapper.employeeMonthlyStatistics(startDate, endDate, storeNumOrName, rewardUserName, storeId);
|
||||
}
|
||||
|
||||
public List<BonusNewProductEmployeeDO> getMonthlyStatisticsGroupByStore(String payMonth) {
|
||||
return mapper.getMonthlyStatisticsGroupByStore(payMonth);
|
||||
}
|
||||
|
||||
public void deleteDailyNewProduct(Long ruleId, String storeId, Date payDate) {
|
||||
Example example = new Example(BonusNewProductEmployeeDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("ruleId", ruleId)
|
||||
.andEqualTo("storeId", storeId)
|
||||
.andEqualTo("payDate", payDate);
|
||||
mapper.deleteByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.cool.store.dao.bonus;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.alibaba.excel.util.CollectionUtils;
|
||||
import com.cool.store.entity.bonus.BonusNewProductRecipeDO;
|
||||
import com.cool.store.mapper.bonus.BonusNewProductRecipeMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 新品销售奖金-菜品DAO
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/4/21
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class BonusNewProductRecipeDAO {
|
||||
private final BonusNewProductRecipeMapper mapper;
|
||||
|
||||
public int insert(BonusNewProductRecipeDO entity) {
|
||||
return mapper.insertSelective(entity);
|
||||
}
|
||||
|
||||
public int insertBatch(List<BonusNewProductRecipeDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return 0;
|
||||
}
|
||||
return mapper.insertBatch(list);
|
||||
}
|
||||
|
||||
public List<BonusNewProductRecipeDO> monthlyStatistics(String storeNumOrName, Date startDate, Date endDate, String recipeNoOrName) {
|
||||
return mapper.monthlyStatistics(storeNumOrName, startDate, endDate, recipeNoOrName);
|
||||
}
|
||||
|
||||
public List<BonusNewProductRecipeDO> selectListByCondition(String storeId, String recipeNo, Date startDate, Date endDate) {
|
||||
return mapper.selectListByCondition(storeId, recipeNo, startDate, endDate);
|
||||
}
|
||||
|
||||
public Map<Long, BonusNewProductRecipeDO> getMapByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Example example = new Example(BonusNewProductRecipeDO.class);
|
||||
example.createCriteria().andIn("id", ids);
|
||||
List<BonusNewProductRecipeDO> list = mapper.selectByExample(example);
|
||||
return CollStreamUtil.toMap(list, BonusNewProductRecipeDO::getId, v -> v);
|
||||
}
|
||||
|
||||
public void deleteDailyNewProduct(Long ruleId, String storeId, Date payDate) {
|
||||
Example example = new Example(BonusNewProductRecipeDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("ruleId", ruleId)
|
||||
.andEqualTo("storeId", storeId)
|
||||
.andEqualTo("payDate", payDate);
|
||||
mapper.deleteByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.cool.store.dao.bonus;
|
||||
|
||||
import com.alibaba.excel.util.CollectionUtils;
|
||||
import com.cool.store.entity.bonus.BonusNewProductRecipeEmployeeDO;
|
||||
import com.cool.store.mapper.bonus.BonusNewProductRecipeEmployeeMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 新品销售奖金-菜品-员工DAO
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/4/21
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class BonusNewProductRecipeEmployeeDAO {
|
||||
private final BonusNewProductRecipeEmployeeMapper mapper;
|
||||
|
||||
public int insert(BonusNewProductRecipeEmployeeDO entity) {
|
||||
return mapper.insertSelective(entity);
|
||||
}
|
||||
|
||||
public int insertBatch(List<BonusNewProductRecipeEmployeeDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return 0;
|
||||
}
|
||||
return mapper.insertBatch(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 月度统计
|
||||
*/
|
||||
public List<BonusNewProductRecipeEmployeeDO> monthlyStatistics(String storeNumOrName, Date startDate, Date endDate, String rewardUserName, String recipeNoOrName) {
|
||||
return mapper.monthlyStatistics(storeNumOrName, startDate, endDate, rewardUserName, recipeNoOrName);
|
||||
}
|
||||
|
||||
public List<BonusNewProductRecipeEmployeeDO> selectListByCondition(String storeId, String recipeNo, String rewardUserId, Date startDate, Date endDate) {
|
||||
Example example = new Example(BonusNewProductRecipeEmployeeDO.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
if (StringUtils.isNotBlank(storeId)) {
|
||||
criteria.andEqualTo("storeId", storeId);
|
||||
}
|
||||
if (StringUtils.isNotBlank(recipeNo)) {
|
||||
criteria.andEqualTo("recipeNo", recipeNo);
|
||||
}
|
||||
if (StringUtils.isNotBlank(rewardUserId)) {
|
||||
criteria.andEqualTo("rewardUserId", rewardUserId);
|
||||
}
|
||||
if (Objects.nonNull(startDate)) {
|
||||
criteria.andGreaterThanOrEqualTo("payDate", startDate);
|
||||
}
|
||||
if (Objects.nonNull(endDate)) {
|
||||
criteria.andLessThanOrEqualTo("payDate", endDate);
|
||||
}
|
||||
example.setOrderByClause("create_time DESC");
|
||||
return mapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public void deleteDailyNewProduct(Long ruleId, String storeId, Date payDate) {
|
||||
Example example = new Example(BonusNewProductRecipeEmployeeDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("ruleId", ruleId)
|
||||
.andEqualTo("storeId", storeId)
|
||||
.andEqualTo("payDate", payDate);
|
||||
mapper.deleteByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.cool.store.dao.bonus;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.bonus.BonusNewProductStoreDO;
|
||||
import com.cool.store.mapper.bonus.BonusNewProductStoreMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 新品销售奖金-门店DAO
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/4/21
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class BonusNewProductStoreDAO {
|
||||
private final BonusNewProductStoreMapper mapper;
|
||||
|
||||
public int insert(BonusNewProductStoreDO entity) {
|
||||
return mapper.insertSelective(entity);
|
||||
}
|
||||
|
||||
public boolean existsByRuleIdAndPayDate(Long ruleId, String payDate) {
|
||||
return mapper.selectCountByRuleIdAndPayDate(ruleId, payDate) > 0;
|
||||
}
|
||||
|
||||
public BonusNewProductStoreDO getById(Long id) {
|
||||
return mapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<BonusNewProductStoreDO> monthlyStatistics(String storeNumOrName, Date startDate, Date endDate, String storeId, Long ruleId) {
|
||||
return mapper.monthlyStatistics(storeNumOrName, startDate, endDate, storeId, ruleId);
|
||||
}
|
||||
|
||||
public void deleteDailyNewProduct(Long ruleId, String storeId, Date payDate) {
|
||||
Example example = new Example(BonusNewProductStoreDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("ruleId", ruleId)
|
||||
.andEqualTo("storeId", storeId)
|
||||
.andEqualTo("payDate", payDate);
|
||||
mapper.deleteByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cool.store.dao.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusReceivedEmployeeDO;
|
||||
import com.cool.store.mapper.bonus.BonusReceivedEmployeeMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 实收奖金发放-员工DAO
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/4/21
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class BonusReceivedEmployeeDAO {
|
||||
private final BonusReceivedEmployeeMapper mapper;
|
||||
|
||||
public int insert(BonusReceivedEmployeeDO entity) {
|
||||
return mapper.insertSelective(entity);
|
||||
}
|
||||
|
||||
public int insertBatch(List<BonusReceivedEmployeeDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return 0;
|
||||
}
|
||||
return mapper.insertBatch(list);
|
||||
}
|
||||
|
||||
public List<BonusReceivedEmployeeDO> selectByReceivedStoreId(Long receivedStoreId) {
|
||||
return mapper.selectByReceivedStoreId(receivedStoreId);
|
||||
}
|
||||
|
||||
public BonusReceivedEmployeeDO getById(Long id) {
|
||||
return mapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<BonusReceivedEmployeeDO> selectEmployeeListByCondition(String storeNumOrName, Date startMonth, Date endMonth, String rewardUserName, String storeId) {
|
||||
return mapper.selectEmployeeListByCondition(storeNumOrName, startMonth, endMonth, rewardUserName, storeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按门店分组统计员工月度实收
|
||||
*/
|
||||
public List<BonusReceivedEmployeeDO> getMonthlyStatisticsGroupByStore(String payMonth) {
|
||||
return mapper.getMonthlyStatisticsGroupByStore(payMonth);
|
||||
}
|
||||
|
||||
public void deleteMonthlyReceived(Long ruleId, String storeId, Date payDate) {
|
||||
Example example = new Example(BonusReceivedEmployeeDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("ruleId", ruleId)
|
||||
.andEqualTo("storeId", storeId)
|
||||
.andEqualTo("payDate", payDate);
|
||||
mapper.deleteByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cool.store.dao.bonus;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.bonus.BonusReceivedStoreDO;
|
||||
import com.cool.store.mapper.bonus.BonusReceivedStoreMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 实收奖金发放-门店DAO
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/4/21
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class BonusReceivedStoreDAO {
|
||||
private final BonusReceivedStoreMapper mapper;
|
||||
|
||||
public int insert(BonusReceivedStoreDO entity) {
|
||||
return mapper.insertSelective(entity);
|
||||
}
|
||||
|
||||
public boolean existsByRuleIdAndPayDate(Long ruleId, String payDate) {
|
||||
return mapper.selectCountByRuleIdAndPayDate(ruleId, payDate) > 0;
|
||||
}
|
||||
|
||||
public BonusReceivedStoreDO getById(Long id) {
|
||||
return mapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<BonusReceivedStoreDO> selectListByCondition(String storeNumOrName, Date startMonth, Date endMonth, String storeId) {
|
||||
return mapper.selectListByCondition(storeNumOrName, startMonth, endMonth, storeId);
|
||||
}
|
||||
|
||||
public Map<Long, BonusReceivedStoreDO> getMapByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Example example = new Example(BonusReceivedStoreDO.class);
|
||||
example.createCriteria()
|
||||
.andIn("id", ids);
|
||||
List<BonusReceivedStoreDO> list = mapper.selectByExample(example);
|
||||
return CollStreamUtil.toMap(list, BonusReceivedStoreDO::getId, v -> v);
|
||||
}
|
||||
|
||||
public void deleteMonthlyReceived(Long ruleId, String storeId, Date payDate) {
|
||||
Example example = new Example(BonusReceivedStoreDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("ruleId", ruleId)
|
||||
.andEqualTo("storeId", storeId)
|
||||
.andEqualTo("payDate", payDate);
|
||||
mapper.deleteByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,14 @@ public interface UserAuthMappingMapper {
|
||||
@Param("positionType")String positionType,
|
||||
@Param("notRoleAuth")String notRoleAuth);
|
||||
|
||||
/**
|
||||
* 与标品一致;listUserAuthMappingByAuth方法会查询出运营顾问等角色
|
||||
*/
|
||||
List<UserAuthMappingDO> listUserAuthMappingByAuthV2(@Param("type") String type,
|
||||
@Param("mappingIdList") List<String> mappingIdList,
|
||||
@Param("positionType")String positionType,
|
||||
@Param("notRoleAuth")String notRoleAuth);
|
||||
|
||||
|
||||
List<UserAuthMappingDO> listUserAuthMappingByUserList(@Param("userIdList") List<String> userIdList);
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.mapper.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusDistributionRuleDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface BonusDistributionRuleMapper extends Mapper<BonusDistributionRuleDO> {
|
||||
|
||||
/**
|
||||
* 门店下相同规则类型的启用规则生效期间有无交集
|
||||
* @param storeId 门店id
|
||||
* @param type 规则类型
|
||||
* @param startDate 开始有效日期
|
||||
* @param endDate 结束有效日期
|
||||
* @return 是否存在
|
||||
*/
|
||||
int existOverlap(@Param("storeId") String storeId, @Param("type") Integer type, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
List<BonusDistributionRuleDO> getList(@Param("storeNumOrName") String storeNumOrName,
|
||||
@Param("type") Integer type,
|
||||
@Param("enable") Integer enable,
|
||||
@Param("storeId") String storeId);
|
||||
|
||||
/**
|
||||
* 获取指定类型和生效月份的启用规则列表
|
||||
*/
|
||||
List<BonusDistributionRuleDO> selectEnabledRulesByTypeAndMonth(@Param("type") Integer type, @Param("payMonth") String payMonth);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.mapper.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusEmployeeRewardDetailDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface BonusEmployeeRewardDetailMapper extends Mapper<BonusEmployeeRewardDetailDO> {
|
||||
|
||||
List<BonusEmployeeRewardDetailDO> selectByStoreIdAndPayDate(@Param("storeId") String storeId,
|
||||
@Param("payDate") String payDate,
|
||||
@Param("userIds") List<String> userIds);
|
||||
|
||||
int updateReceivedAmountById(@Param("id") Long id, @Param("receivedAmount") BigDecimal receivedAmount);
|
||||
|
||||
int updateNewProjectAmountById(@Param("id") Long id, @Param("newProjectAmount") BigDecimal newProjectAmount);
|
||||
|
||||
int insertOrUpdateBatch(@Param("list") List<BonusEmployeeRewardDetailDO> list);
|
||||
|
||||
List<BonusEmployeeRewardDetailDO> selectListByCondition(@Param("storeNumOrName") String storeNumOrName,
|
||||
@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("rewardUserName") String rewardUserName,
|
||||
@Param("storeId") String storeId);
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.cool.store.mapper.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusNewProductEmployeeDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public interface BonusNewProductEmployeeMapper extends Mapper<BonusNewProductEmployeeDO> {
|
||||
|
||||
/**
|
||||
* 月度统计
|
||||
*
|
||||
* @param storeId 门店id
|
||||
* @param payDate 发放年月
|
||||
* @param userIds 用户id列表
|
||||
* @return 实体列表
|
||||
*/
|
||||
List<Map<String, Objects>> getMonthlyStatistics(@Param("storeId") String storeId,
|
||||
@Param("payDate") String payDate,
|
||||
@Param("userIds") List<String> userIds);
|
||||
|
||||
int insertBatch(@Param("list") List<BonusNewProductEmployeeDO> list);
|
||||
|
||||
List<BonusNewProductEmployeeDO> monthlyStatistics(@Param("ruleId") Long ruleId,
|
||||
@Param("storeId") String storeId,
|
||||
@Param("payDate") Date payDate,
|
||||
@Param("userId") String userId);
|
||||
|
||||
/**
|
||||
* 员工列表月度统计
|
||||
*/
|
||||
List<BonusNewProductEmployeeDO> employeeMonthlyStatistics(@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("storeNumOrName") String storeNumOrName,
|
||||
@Param("rewardUserName") String rewardUserName,
|
||||
@Param("storeId") String storeId);
|
||||
|
||||
/**
|
||||
* 按门店分组统计员工月度新品销售
|
||||
*/
|
||||
List<BonusNewProductEmployeeDO> getMonthlyStatisticsGroupByStore(@Param("payMonth") String payMonth);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.mapper.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusNewProductRecipeEmployeeDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface BonusNewProductRecipeEmployeeMapper extends Mapper<BonusNewProductRecipeEmployeeDO> {
|
||||
|
||||
int insertBatch(@Param("list") List<BonusNewProductRecipeEmployeeDO> list);
|
||||
|
||||
/**
|
||||
* 月度统计
|
||||
*/
|
||||
List<BonusNewProductRecipeEmployeeDO> monthlyStatistics(@Param("storeNumOrName") String storeNumOrName,
|
||||
@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("rewardUserName") String rewardUserName,
|
||||
@Param("recipeNoOrName") String recipeNoOrName);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.mapper.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusNewProductRecipeDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface BonusNewProductRecipeMapper extends Mapper<BonusNewProductRecipeDO> {
|
||||
|
||||
int insertBatch(@Param("list") List<BonusNewProductRecipeDO> list);
|
||||
|
||||
List<BonusNewProductRecipeDO> monthlyStatistics(@Param("storeNumOrName") String storeNumOrName,
|
||||
@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("recipeNoOrName") String recipeNoOrName);
|
||||
|
||||
List<BonusNewProductRecipeDO> selectListByCondition(@Param("storeId") String storeId,
|
||||
@Param("recipeNo") String recipeNo,
|
||||
@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.mapper.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusNewProductStoreDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface BonusNewProductStoreMapper extends Mapper<BonusNewProductStoreDO> {
|
||||
|
||||
int selectCountByRuleIdAndPayDate(@Param("ruleId") Long ruleId, @Param("payDate") String payDate);
|
||||
|
||||
List<BonusNewProductStoreDO> monthlyStatistics(@Param("storeNumOrName") String storeNumOrName,
|
||||
@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate,
|
||||
@Param("storeId") String storeId,
|
||||
@Param("ruleId") Long ruleId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.mapper.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusReceivedEmployeeDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface BonusReceivedEmployeeMapper extends Mapper<BonusReceivedEmployeeDO> {
|
||||
int insertBatch(@Param("list") List<BonusReceivedEmployeeDO> list);
|
||||
|
||||
List<BonusReceivedEmployeeDO> selectByReceivedStoreId(@Param("receivedStoreId") Long receivedStoreId);
|
||||
|
||||
List<BonusReceivedEmployeeDO> selectEmployeeListByCondition(@Param("storeNumOrName") String storeNumOrName,
|
||||
@Param("startMonth") Date startMonth,
|
||||
@Param("endMonth") Date endMonth,
|
||||
@Param("rewardUserName") String rewardUserName,
|
||||
@Param("storeId") String storeId);
|
||||
|
||||
/**
|
||||
* 按门店分组统计员工月度实收
|
||||
*/
|
||||
List<BonusReceivedEmployeeDO> getMonthlyStatisticsGroupByStore(@Param("payMonth") String payMonth);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.mapper.bonus;
|
||||
|
||||
import com.cool.store.entity.bonus.BonusReceivedStoreDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface BonusReceivedStoreMapper extends Mapper<BonusReceivedStoreDO> {
|
||||
|
||||
int selectCountByRuleIdAndPayDate(@Param("ruleId") Long ruleId, @Param("payDate") String payDate);
|
||||
|
||||
List<BonusReceivedStoreDO> selectListByCondition(@Param("storeNumOrName") String storeNumOrName,
|
||||
@Param("startMonth") Date startMonth,
|
||||
@Param("endMonth") Date endMonth,
|
||||
@Param("storeId") String storeId);
|
||||
}
|
||||
Reference in New Issue
Block a user