Merge #132 into master from revert-56b85c33-20f063dc
Revert commit "Merge #128 into master from cc_20250512_uploadRentContract * revert-56b85c33-20f063dc: (1 commits squashed) - Revert commit "Merge #128 into master from cc_20250512_uploadRentContract This reverts change request#128 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/132
This commit is contained in:
@@ -12,10 +12,8 @@ import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -29,16 +27,8 @@ public class BigRegionDAO {
|
||||
@Resource
|
||||
BigRegionMapper bigRegionMapper;
|
||||
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand,Integer type,Integer enable){
|
||||
return bigRegionMapper.queryAllBigRegion(keyword, joinBrand,type,enable);
|
||||
}
|
||||
|
||||
public Map<Long,BigRegionDO> getMapByRegionIds(List<Long> regionIdList){
|
||||
if (CollectionUtils.isEmpty(regionIdList)){
|
||||
return new HashMap<>();
|
||||
}
|
||||
List<BigRegionDO> bigRegionDOList = bigRegionMapper.getByRegionIdList(regionIdList);
|
||||
return bigRegionDOList.stream().collect(Collectors.toMap(BigRegionDO::getRegionId, bigRegionDO -> bigRegionDO));
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand,Integer type){
|
||||
return bigRegionMapper.queryAllBigRegion(keyword, joinBrand,type);
|
||||
}
|
||||
|
||||
public BigRegionDO queryOrgInfoByBigRegionAndJoinMode(Long regionId, Integer joinMode){
|
||||
|
||||
@@ -8,7 +8,6 @@ import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -115,8 +114,4 @@ public class LinePayDAO {
|
||||
}
|
||||
return linePayMapper.deleteByShopId(shopIds);
|
||||
}
|
||||
|
||||
public Integer updateAmountAndPayUserName(Long id, BigDecimal amount, String payUserName, String userId){
|
||||
return linePayMapper.updateAmountAndPayUserName(id,amount,payUserName,userId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,10 @@ import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import com.cool.store.mapper.OpeningOperationPlanMapper;
|
||||
import com.cool.store.request.PlanListRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -54,11 +52,5 @@ public class OpeningOperationPlanDAO {
|
||||
return openingOperationPlanMapper.selectByShopId(shopId);
|
||||
}
|
||||
|
||||
public List<OpeningOperationPlanDO> selectByShopIds( List<Long> shopIds){
|
||||
if (CollectionUtils.isEmpty(shopIds)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return openingOperationPlanMapper.selectByShopIds(shopIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.ReceivingBankDO;
|
||||
import com.cool.store.mapper.ReceivingBankMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/06/18/17:34
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
public class ReceivingBankDAO {
|
||||
@Resource
|
||||
private ReceivingBankMapper receivingBankMapper;
|
||||
|
||||
public Integer insertSelective(ReceivingBankDO receivingBankDO){
|
||||
return receivingBankMapper.insertSelective(receivingBankDO);
|
||||
}
|
||||
public List<ReceivingBankDO> getByFranchiseBrandAndRegionId(List<String> franchiseBrandList,List<Long> regionIdList){
|
||||
return receivingBankMapper.getByFranchiseBrandAndRegionId(franchiseBrandList,regionIdList);
|
||||
}
|
||||
public Integer updateByPrimaryKeySelective(ReceivingBankDO receivingBankDO){
|
||||
return receivingBankMapper.updateByPrimaryKeySelective(receivingBankDO);
|
||||
}
|
||||
|
||||
public Integer batchInsert(List<ReceivingBankDO> list){
|
||||
return receivingBankMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
public List<ReceivingBankDO> queryAll(){
|
||||
Example example = new Example(ReceivingBankDO.class);
|
||||
example.createCriteria().andEqualTo("deleted",false);
|
||||
List<ReceivingBankDO> receivingBankDOS = receivingBankMapper.selectByExample(example);
|
||||
if (receivingBankDOS == null){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return receivingBankDOS;
|
||||
}
|
||||
public List<ReceivingBankDO> getByRegionAndFranchiseBrandAndPayType(Long regionId,Integer franchiseBrand,Integer payType){
|
||||
Example example = new Example(ReceivingBankDO.class);
|
||||
example.createCriteria().andEqualTo("deleted",false)
|
||||
.andEqualTo("regionId",regionId).andEqualTo("franchiseBrand",franchiseBrand)
|
||||
.andEqualTo("payType",payType);
|
||||
List<ReceivingBankDO> receivingBankDOS = receivingBankMapper.selectByExample(example);
|
||||
return receivingBankDOS;
|
||||
|
||||
}
|
||||
public Integer batchInsertOrUpdate(List<ReceivingBankDO> receivingBankDOList){
|
||||
if (CollectionUtils.isEmpty(receivingBankDOList)){
|
||||
log.info("receivingBankDOList is empty");
|
||||
return 0;
|
||||
}
|
||||
return receivingBankMapper.batchInsertOrUpdate(receivingBankDOList);
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.dto.store.StoreAddressDTO;
|
||||
import com.cool.store.dto.store.StoreExtendSoftOpenDTO;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.dto.store.StoreReportDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.enums.StoreStatusEnum;
|
||||
import com.cool.store.mapper.StoreMapper;
|
||||
@@ -20,7 +19,6 @@ import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -104,18 +102,6 @@ public class StoreDao {
|
||||
return storeMapper.getStoreNumByStoreCodes(storeCodeIds);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 门店状态改为闭店
|
||||
* @param storeId 门店id
|
||||
* @param closeReason 闭店原因
|
||||
* @param closeNature 闭店性质
|
||||
*/
|
||||
public void closeStore(String storeId, Integer closeReason, Integer closeNature) {
|
||||
if (storeMapper.closeStore(storeId) > 0) {
|
||||
storeMapper.insertOrUpdateCloseInfo(storeId, closeReason, closeNature);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 新增或编辑最新订货时间
|
||||
* @param dtoList 门店最新订货时间DTO列表
|
||||
@@ -309,49 +295,6 @@ public class StoreDao {
|
||||
return storeMapper.getPrivateSphereQrCode(storeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 总营业门店数量统计
|
||||
*/
|
||||
public Map<Integer, Integer> totalOpenStoreReport(String date, Integer domestic, List<Integer> joinBrandList) {
|
||||
if (CollectionUtils.isEmpty(joinBrandList)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
List<StoreReportDTO> list = storeMapper.totalOpenStoreReport(date, domestic, joinBrandList);
|
||||
return CollStreamUtil.toMap(list, StoreReportDTO::getJoinBrand, StoreReportDTO::getNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 期初门店数
|
||||
*/
|
||||
public Map<Integer, Integer> periodBeginStoreReport(String date, Integer domestic, List<Integer> joinBrandList) {
|
||||
if (CollectionUtils.isEmpty(joinBrandList)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
List<StoreReportDTO> list = storeMapper.periodBeginStoreReport(date, domestic, joinBrandList);
|
||||
return CollStreamUtil.toMap(list, StoreReportDTO::getJoinBrand, StoreReportDTO::getNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新开门店数
|
||||
*/
|
||||
public Map<Integer, Integer> newOpenStoreReport(String date, Integer domestic, List<Integer> joinBrandList) {
|
||||
if (CollectionUtils.isEmpty(joinBrandList)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
List<StoreReportDTO> list = storeMapper.newOpenStoreReport(date, domestic, joinBrandList);
|
||||
return CollStreamUtil.toMap(list, StoreReportDTO::getJoinBrand, StoreReportDTO::getNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 闭店门店数
|
||||
*/
|
||||
public Map<Integer, Integer> closeStoreReport(String date, Integer domestic, List<Integer> joinBrandList) {
|
||||
if (CollectionUtils.isEmpty(joinBrandList)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
List<StoreReportDTO> list = storeMapper.closeStoreReport(date, domestic, joinBrandList);
|
||||
return CollStreamUtil.toMap(list, StoreReportDTO::getJoinBrand, StoreReportDTO::getNum);
|
||||
}
|
||||
/**
|
||||
* 批量新增或编辑开始试营业日期
|
||||
*/
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.ThirdPartyAccountDO;
|
||||
import com.cool.store.mapper.ThirdPartyAccountMapper;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/5/26 16:59
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Repository
|
||||
public class ThirdPartyAccountDAO {
|
||||
|
||||
@Resource
|
||||
ThirdPartyAccountMapper thirdPartyAccountMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
* @param thirdPartyAccountDO
|
||||
* @return
|
||||
*/
|
||||
public int addPushRecord(ThirdPartyAccountDO thirdPartyAccountDO){
|
||||
return thirdPartyAccountMapper.insertSelective(thirdPartyAccountDO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ThirdPartyAccountDO getByCodeAndMobile(String shopCode, String mobile){
|
||||
if (StringUtil.isAnyBlank(shopCode,mobile)){
|
||||
return null;
|
||||
}
|
||||
return thirdPartyAccountMapper.getByCodeAndMobile(shopCode,mobile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean exists(String shopCode, String mobile){
|
||||
if (StringUtil.isAnyBlank(shopCode,mobile)){
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return thirdPartyAccountMapper.exists(shopCode,mobile);
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.ThirdPartyStoreDO;
|
||||
import com.cool.store.mapper.ThirdPartyStoreMapper;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/5/26 16:58
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Repository
|
||||
public class ThirdPartyStoreDAO {
|
||||
|
||||
@Resource
|
||||
ThirdPartyStoreMapper thirdPartyStoreMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 新增推送数据记录
|
||||
* @param thirdPartyStoreDO
|
||||
* @return
|
||||
*/
|
||||
public int addPushRecord(ThirdPartyStoreDO thirdPartyStoreDO){
|
||||
return thirdPartyStoreMapper.insertSelective(thirdPartyStoreDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过门店编码查询推送记录
|
||||
* @param storeCode
|
||||
* @return
|
||||
*/
|
||||
public ThirdPartyStoreDO getByLocalStoreCode(String storeCode){
|
||||
if (StringUtil.isEmpty(storeCode)){
|
||||
return null;
|
||||
}
|
||||
return thirdPartyStoreMapper.getByLocalStoreCode(storeCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店是否存在
|
||||
* @param localStoreCode
|
||||
* @return
|
||||
*/
|
||||
public boolean exists(String localStoreCode){
|
||||
if (StringUtil.isEmpty(localStoreCode)){
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return thirdPartyStoreMapper.exists(localStoreCode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
package com.cool.store.dao.approval;
|
||||
|
||||
import com.cool.store.entity.approval.CommonApprovalLogDO;
|
||||
import com.cool.store.enums.approval.ApprovalResultEnum;
|
||||
import com.cool.store.mapper.approval.CommonApprovalLogMapper;
|
||||
import com.cool.store.utils.GenerateNoUtil;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static javassist.CtClass.version;
|
||||
|
||||
@Repository
|
||||
public class CommonApprovalLogDAO {
|
||||
|
||||
@Resource
|
||||
private CommonApprovalLogMapper commonApprovalLogMapper;
|
||||
|
||||
/**
|
||||
* 插入单条审批记录(提交场景:加盟商确认)
|
||||
*/
|
||||
public int addSubmitRecord(String applicationNo, String handleUserId, String handleUserName, String nodeCode, String nodeName) {
|
||||
Long version = GenerateNoUtil.generateVersion();
|
||||
CommonApprovalLogDO record = CommonApprovalLogDO.builder()
|
||||
.applicationNo(applicationNo)
|
||||
.version(version)
|
||||
.nodeCode(nodeCode)
|
||||
.nodeName(nodeName)
|
||||
.handleUserId(handleUserId)
|
||||
.handleUserName(handleUserName)
|
||||
.result(ApprovalResultEnum.PASS.getResult())
|
||||
.status("1")
|
||||
.submitType(0)
|
||||
.operateTime(new Date())
|
||||
.deleted(0)
|
||||
.build();
|
||||
return commonApprovalLogMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入待处理审批记录(审批节点)
|
||||
*/
|
||||
public int addApproveRecord(String applicationNo, String nodeCode, String nodeName, String handleUserId, String handleUserName,Long version) {
|
||||
if (version == null){
|
||||
version = GenerateNoUtil.generateVersion();
|
||||
}
|
||||
CommonApprovalLogDO record = CommonApprovalLogDO.builder()
|
||||
.applicationNo(applicationNo)
|
||||
.version(version)
|
||||
.nodeCode(nodeCode)
|
||||
.nodeName(nodeName)
|
||||
.handleUserId(handleUserId)
|
||||
.handleUserName(handleUserName)
|
||||
.status("2")
|
||||
.submitType(1)
|
||||
.operateTime(new Date())
|
||||
.deleted(0)
|
||||
.build();
|
||||
return commonApprovalLogMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量插入审批记录
|
||||
*/
|
||||
public int batchInsertApprovalRecords(List<CommonApprovalLogDO> list) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
return commonApprovalLogMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
public void updateRecord(CommonApprovalLogDO record) {
|
||||
commonApprovalLogMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新审批记录
|
||||
*/
|
||||
public int batchUpdateRecords(List<CommonApprovalLogDO> list) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
return commonApprovalLogMapper.batchUpdate(list);
|
||||
}
|
||||
|
||||
public CommonApprovalLogDO getById(Long id) {
|
||||
return commonApprovalLogMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<CommonApprovalLogDO> getByApplicationNo(String applicationNo) {
|
||||
return commonApprovalLogMapper.getByApplicationNo(applicationNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定申请号和节点的待处理记录
|
||||
*/
|
||||
public List<CommonApprovalLogDO> getPendingByApplicationNoAndNodeCode(String applicationNo, String nodeCode) {
|
||||
Example example = new Example(CommonApprovalLogDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("applicationNo", applicationNo)
|
||||
.andEqualTo("nodeCode", nodeCode)
|
||||
.andEqualTo("status", "2")
|
||||
.andEqualTo("deleted", 0);
|
||||
return commonApprovalLogMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定申请号最新版本号的待处理记录
|
||||
*/
|
||||
public List<CommonApprovalLogDO> getLatestPendingRecords(String applicationNo, Integer version) {
|
||||
Example example = new Example(CommonApprovalLogDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("applicationNo", applicationNo)
|
||||
.andEqualTo("version", version)
|
||||
.andEqualTo("status", "2")
|
||||
.andEqualTo("deleted", 0);
|
||||
return commonApprovalLogMapper.selectByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.cool.store.dao.contract;
|
||||
|
||||
import com.cool.store.entity.contract.ContractCostDO;
|
||||
import com.cool.store.mapper.contract.ContractCostMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public class ContractCostDAO {
|
||||
|
||||
@Resource
|
||||
private ContractCostMapper contractCostMapper;
|
||||
|
||||
public int insertSelective(ContractCostDO record) {
|
||||
return contractCostMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public List<ContractCostDO> queryByContractNo(String contractNo) {
|
||||
return contractCostMapper.queryByContractNo(contractNo);
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package com.cool.store.dao.contract;
|
||||
|
||||
import com.cool.store.entity.contract.ContractMasterDO;
|
||||
import com.cool.store.mapper.contract.ContractMasterMapper;
|
||||
import com.cool.store.request.contract.ContractMasterQueryRequest;
|
||||
import com.cool.store.vo.contract.ContractMasterListVO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public class ContractMasterDAO {
|
||||
|
||||
@Resource
|
||||
private ContractMasterMapper contractMasterMapper;
|
||||
|
||||
public int insertSelective(ContractMasterDO record) {
|
||||
return contractMasterMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public int updateByPrimaryKeySelective(ContractMasterDO record) {
|
||||
return contractMasterMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
public ContractMasterDO getById(Long id) {
|
||||
return contractMasterMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<ContractMasterListVO> queryContractMasterList(ContractMasterQueryRequest request) {
|
||||
return contractMasterMapper.queryContractMasterList(request);
|
||||
}
|
||||
|
||||
public List<ContractMasterDO> queryContractsNearExpiry(int days) {
|
||||
return contractMasterMapper.queryContractsNearExpiry(days);
|
||||
}
|
||||
|
||||
public ContractMasterDO getLatestContractByStoreCode(String storeCode) {
|
||||
return contractMasterMapper.getLatestContractByStoreCode(storeCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新续签申请标记(乐观锁:仅当renewalCreated=0时更新)
|
||||
*/
|
||||
public int updateRenewalCreated(Long id, Integer renewalCreated) {
|
||||
Example example = new Example(ContractMasterDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("id", id)
|
||||
.andEqualTo("renewalCreated", 0);
|
||||
ContractMasterDO update = new ContractMasterDO();
|
||||
update.setId(id);
|
||||
update.setRenewalCreated(renewalCreated);
|
||||
return contractMasterMapper.updateByPrimaryKeySelective(update);
|
||||
}
|
||||
|
||||
public ContractMasterDO getByContractNo(String contractNo) {
|
||||
Example example = new Example(ContractMasterDO.class);
|
||||
example.createCriteria().andEqualTo("contractNo", contractNo);
|
||||
return contractMasterMapper.selectOneByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package com.cool.store.dao.exam;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.exam.ExamAttemptAnswerDO;
|
||||
import com.cool.store.mapper.exam.ExamAttemptAnswerMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 答题记录DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ExamAttemptAnswerDAO {
|
||||
|
||||
private final ExamAttemptAnswerMapper examAttemptAnswerMapper;
|
||||
|
||||
public int insertSelective(ExamAttemptAnswerDO record) {
|
||||
return examAttemptAnswerMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public int updateByPrimaryKeySelective(ExamAttemptAnswerDO record) {
|
||||
return examAttemptAnswerMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
public ExamAttemptAnswerDO selectByPrimaryKey(Long id) {
|
||||
return examAttemptAnswerMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<ExamAttemptAnswerDO> select(ExamAttemptAnswerDO record) {
|
||||
return examAttemptAnswerMapper.select(record);
|
||||
}
|
||||
|
||||
public int insertOrUpdate(ExamAttemptAnswerDO record) {
|
||||
return examAttemptAnswerMapper.insertOrUpdate(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据答卷ID批量查询答案,返回Map(key: paperQuestionId)
|
||||
*/
|
||||
public Map<Long, ExamAttemptAnswerDO> getMapByAttemptId(Long attemptId) {
|
||||
Example example = new Example(ExamAttemptAnswerDO.class);
|
||||
example.createCriteria().andEqualTo("attemptId", attemptId);
|
||||
List<ExamAttemptAnswerDO> list = examAttemptAnswerMapper.selectByExample(example);
|
||||
return CollStreamUtil.toMap(list, ExamAttemptAnswerDO::getPaperQuestionId, v -> v);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量插入或更新答案
|
||||
*/
|
||||
public void batchInsertOrUpdate(List<ExamAttemptAnswerDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
examAttemptAnswerMapper.batchInsertOrUpdate(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量更新分数
|
||||
*/
|
||||
public void batchUpdateScore(List<ExamAttemptAnswerDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
examAttemptAnswerMapper.batchUpdateScore(list);
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
package com.cool.store.dao.exam;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.exam.ExamAttemptDO;
|
||||
import com.cool.store.mapper.exam.ExamAttemptMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 答卷DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ExamAttemptDAO {
|
||||
|
||||
private final ExamAttemptMapper examAttemptMapper;
|
||||
|
||||
public int insertSelective(ExamAttemptDO record) {
|
||||
return examAttemptMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public int updateByPrimaryKeySelective(ExamAttemptDO record) {
|
||||
return examAttemptMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
public ExamAttemptDO selectByPrimaryKey(Long id) {
|
||||
return examAttemptMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<ExamAttemptDO> select(ExamAttemptDO record) {
|
||||
return examAttemptMapper.select(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新答卷状态和成绩
|
||||
*/
|
||||
public void updateStatusAndScore(Long id, Integer status, Integer submitType, BigDecimal totalScore) {
|
||||
ExamAttemptDO updateDO = new ExamAttemptDO();
|
||||
updateDO.setId(id);
|
||||
updateDO.setStatus(status);
|
||||
updateDO.setSubmitType(submitType);
|
||||
updateDO.setTotalScore(totalScore);
|
||||
updateDO.setEndTime(new Date());
|
||||
examAttemptMapper.updateByPrimaryKeySelective(updateDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据考试ID和手机号查询进行中的答卷
|
||||
*/
|
||||
public ExamAttemptDO selectInProgressByExamIdAndMobile(Long examId, String mobile) {
|
||||
Example example = new Example(ExamAttemptDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("examId", examId)
|
||||
.andEqualTo("mobile", mobile)
|
||||
.andEqualTo("status", 0);
|
||||
example.setOrderByClause("id desc");
|
||||
List<ExamAttemptDO> list = examAttemptMapper.selectByExample(example);
|
||||
return list.isEmpty() ? null : list.get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据手机号分页查询答卷列表
|
||||
*/
|
||||
public List<ExamAttemptDO> selectByMobile(String mobile) {
|
||||
Example example = new Example(ExamAttemptDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("mobile", mobile);
|
||||
example.setOrderByClause("id desc");
|
||||
return examAttemptMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参考人数
|
||||
* @param examInfoIds 考试信息id列表
|
||||
* @return 考试id->参考人数
|
||||
*/
|
||||
public Map<Long, Long> getAttemptCount(List<Long> examInfoIds) {
|
||||
List<Map<String, Object>> list = examAttemptMapper.getAttemptCount(examInfoIds);
|
||||
return CollStreamUtil.toMap(list, v -> MapUtils.getLong(v, "exam_id"), v -> MapUtils.getLong(v, "attempt_count"));
|
||||
}
|
||||
|
||||
public boolean existFinishAttempt(String mobile, Long examId) {
|
||||
Example example = new Example(ExamAttemptDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("mobile", mobile)
|
||||
.andEqualTo("examId", examId)
|
||||
.andEqualTo("status", 1);
|
||||
return examAttemptMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
package com.cool.store.dao.exam;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.exam.ExamInfoDO;
|
||||
import com.cool.store.mapper.exam.ExamInfoMapper;
|
||||
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;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 考试信息DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ExamInfoDAO {
|
||||
|
||||
private final ExamInfoMapper examInfoMapper;
|
||||
|
||||
public int insertSelective(ExamInfoDO record) {
|
||||
return examInfoMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public int updateByPrimaryKeySelective(ExamInfoDO record) {
|
||||
return examInfoMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
public ExamInfoDO selectByPrimaryKey(Long id) {
|
||||
return examInfoMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<ExamInfoDO> select(ExamInfoDO record) {
|
||||
return examInfoMapper.select(record);
|
||||
}
|
||||
|
||||
public ExamInfoDO selectByToken(String token) {
|
||||
return examInfoMapper.selectByToken(token);
|
||||
}
|
||||
|
||||
/**
|
||||
* 条件查询列表
|
||||
*/
|
||||
public List<ExamInfoDO> selectList(Integer status) {
|
||||
Example example = new Example(ExamInfoDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("deleted", 0);
|
||||
if (Objects.nonNull(status)) {
|
||||
criteria.andEqualTo("status", status);
|
||||
}
|
||||
example.setOrderByClause("create_time desc");
|
||||
return examInfoMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
*/
|
||||
public void updateStatus(Long id, Integer status) {
|
||||
ExamInfoDO examInfoDO = new ExamInfoDO();
|
||||
examInfoDO.setId(id);
|
||||
examInfoDO.setStatus(status);
|
||||
examInfoMapper.updateByPrimaryKeySelective(examInfoDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID批量查询
|
||||
*/
|
||||
public List<ExamInfoDO> selectByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Example example = new Example(ExamInfoDO.class);
|
||||
example.createCriteria()
|
||||
.andIn("id", ids)
|
||||
.andEqualTo("deleted", 0);
|
||||
return examInfoMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID批量查询,返回Map
|
||||
*/
|
||||
public Map<Long, ExamInfoDO> getMapByIds(List<Long> ids) {
|
||||
List<ExamInfoDO> list = selectByIds(ids);
|
||||
return CollStreamUtil.toMap(list, ExamInfoDO::getId, v -> v);
|
||||
}
|
||||
|
||||
public Map<Long, ExamInfoDO> getMapIncludeDeletedByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Example example = new Example(ExamInfoDO.class);
|
||||
example.createCriteria()
|
||||
.andIn("id", ids);
|
||||
List<ExamInfoDO> list = examInfoMapper.selectByExample(example);
|
||||
return CollStreamUtil.toMap(list, ExamInfoDO::getId, v -> v);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID删除(逻辑删除)
|
||||
*/
|
||||
public void deleteById(Long id) {
|
||||
ExamInfoDO updateDO = new ExamInfoDO();
|
||||
updateDO.setId(id);
|
||||
updateDO.setDeleted(1);
|
||||
examInfoMapper.updateByPrimaryKeySelective(updateDO);
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package com.cool.store.dao.exam;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.exam.ExamPaperDO;
|
||||
import com.cool.store.mapper.exam.ExamPaperMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 试卷DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ExamPaperDAO {
|
||||
|
||||
private final ExamPaperMapper examPaperMapper;
|
||||
|
||||
public int insertSelective(ExamPaperDO record) {
|
||||
return examPaperMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public int updateByPrimaryKeySelective(ExamPaperDO record) {
|
||||
return examPaperMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
public ExamPaperDO selectByPrimaryKey(Long id) {
|
||||
return examPaperMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<ExamPaperDO> select(ExamPaperDO record) {
|
||||
return examPaperMapper.select(record);
|
||||
}
|
||||
|
||||
public int selectCount(ExamPaperDO record) {
|
||||
return examPaperMapper.selectCount(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 条件查询列表
|
||||
*/
|
||||
public List<ExamPaperDO> selectList(String paperName, Integer enable, Integer startExam) {
|
||||
Example example = new Example(ExamPaperDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("deleted", 0);
|
||||
if (StringUtils.isNotBlank(paperName)) {
|
||||
criteria.andLike("paperName", "%" + paperName + "%");
|
||||
}
|
||||
if (Objects.nonNull(enable)) {
|
||||
criteria.andEqualTo("enable", enable);
|
||||
}
|
||||
if (Objects.nonNull(startExam)) {
|
||||
criteria.andEqualTo("startExam", startExam);
|
||||
}
|
||||
example.setOrderByClause("create_time desc");
|
||||
return examPaperMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID删除(逻辑删除)
|
||||
*/
|
||||
public void deleteById(Long id) {
|
||||
ExamPaperDO paperDO = new ExamPaperDO();
|
||||
paperDO.setId(id);
|
||||
paperDO.setDeleted(1);
|
||||
examPaperMapper.updateByPrimaryKeySelective(paperDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新开始考试状态
|
||||
*/
|
||||
public void updateStartExam(Long id, Integer startExam) {
|
||||
ExamPaperDO paperDO = new ExamPaperDO();
|
||||
paperDO.setId(id);
|
||||
paperDO.setStartExam(startExam);
|
||||
examPaperMapper.updateByPrimaryKeySelective(paperDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID列表批量查询,返回Map
|
||||
*/
|
||||
public Map<Long, ExamPaperDO> getMapByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Example example = new Example(ExamPaperDO.class);
|
||||
example.createCriteria().andIn("id", ids);
|
||||
List<ExamPaperDO> list = examPaperMapper.selectByExample(example);
|
||||
return CollStreamUtil.toMap(list, ExamPaperDO::getId, v -> v);
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
package com.cool.store.dao.exam;
|
||||
|
||||
import com.cool.store.entity.exam.ExamPaperQuestionDO;
|
||||
import com.cool.store.mapper.exam.ExamPaperQuestionMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 试卷题目DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ExamPaperQuestionDAO {
|
||||
|
||||
private final ExamPaperQuestionMapper examPaperQuestionMapper;
|
||||
|
||||
public int insertSelective(ExamPaperQuestionDO record) {
|
||||
return examPaperQuestionMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public int updateByPrimaryKeySelective(ExamPaperQuestionDO record) {
|
||||
return examPaperQuestionMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
public ExamPaperQuestionDO selectByPrimaryKey(Long id) {
|
||||
return examPaperQuestionMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<ExamPaperQuestionDO> select(ExamPaperQuestionDO record) {
|
||||
return examPaperQuestionMapper.select(record);
|
||||
}
|
||||
|
||||
public int selectCount(ExamPaperQuestionDO record) {
|
||||
return examPaperQuestionMapper.selectCount(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据试卷ID查询题目数量
|
||||
*/
|
||||
public int countByPaperId(Long paperId) {
|
||||
Example example = new Example(ExamPaperQuestionDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("paperId", paperId)
|
||||
.andEqualTo("deleted", 0);
|
||||
return examPaperQuestionMapper.selectCountByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
*/
|
||||
public int insertBatch(List<ExamPaperQuestionDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return 0;
|
||||
}
|
||||
return examPaperQuestionMapper.insertBatch(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据试卷ID批量删除(逻辑删除)
|
||||
*/
|
||||
public int deleteByPaperId(Long paperId) {
|
||||
return examPaperQuestionMapper.deleteByPaperId(paperId, new java.util.Date());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据试卷ID查询题目列表
|
||||
*/
|
||||
public List<ExamPaperQuestionDO> selectByPaperId(Long paperId) {
|
||||
Example example = new Example(ExamPaperQuestionDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("paperId", paperId)
|
||||
.andEqualTo("deleted", 0);
|
||||
example.setOrderByClause("id asc");
|
||||
return examPaperQuestionMapper.selectByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
package com.cool.store.dao.exam;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.exam.ExamQuestionDO;
|
||||
import com.cool.store.mapper.exam.ExamQuestionMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 题目DAO
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class ExamQuestionDAO {
|
||||
|
||||
private final ExamQuestionMapper examQuestionMapper;
|
||||
|
||||
public int insertSelective(ExamQuestionDO record) {
|
||||
return examQuestionMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public int updateByPrimaryKeySelective(ExamQuestionDO record) {
|
||||
return examQuestionMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
public ExamQuestionDO selectByPrimaryKey(Long id) {
|
||||
return examQuestionMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public Map<Long, ExamQuestionDO> getMapByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)){
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Example example = new Example(ExamQuestionDO.class);
|
||||
example.createCriteria()
|
||||
.andIn("id", ids);
|
||||
List<ExamQuestionDO> list = examQuestionMapper.selectByExample(example);
|
||||
return CollStreamUtil.toMap(list, ExamQuestionDO::getId, v -> v);
|
||||
}
|
||||
|
||||
public List<ExamQuestionDO> selecList(Integer type, Integer difficulty, String questionStem, Integer enable) {
|
||||
Example example = new Example(ExamQuestionDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("deleted", 0);
|
||||
if (Objects.nonNull(type)) {
|
||||
criteria.andEqualTo("type", type);
|
||||
}
|
||||
if (Objects.nonNull(difficulty)) {
|
||||
criteria.andEqualTo("difficulty", difficulty);
|
||||
}
|
||||
if (StringUtils.isNotBlank(questionStem)) {
|
||||
criteria.andLike("questionStem", "%" + questionStem + "%");
|
||||
}
|
||||
if (Objects.nonNull(enable)) {
|
||||
criteria.andEqualTo("enable", enable);
|
||||
}
|
||||
example.setOrderByClause("create_time desc");
|
||||
return examQuestionMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public int selectCount(ExamQuestionDO record) {
|
||||
return examQuestionMapper.selectCount(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量逻辑删除
|
||||
*/
|
||||
public void batchDeleteByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
return ;
|
||||
}
|
||||
Example example = new Example(ExamQuestionDO.class);
|
||||
example.createCriteria()
|
||||
.andIn("id", ids)
|
||||
.andEqualTo("deleted", 0);
|
||||
ExamQuestionDO updateDO = new ExamQuestionDO();
|
||||
updateDO.setDeleted(1);
|
||||
examQuestionMapper.updateByExampleSelective(updateDO, example);
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.cool.store.dao.renewal;
|
||||
|
||||
import com.cool.store.entity.renewal.RenewalApplicationDO;
|
||||
import com.cool.store.mapper.renewal.RenewalApplicationMapper;
|
||||
import com.cool.store.request.renewal.RenewalApplicationQueryRequest;
|
||||
import com.cool.store.vo.renewal.RenewalApplicationListVO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public class RenewalApplicationDAO {
|
||||
|
||||
@Resource
|
||||
private RenewalApplicationMapper renewalApplicationMapper;
|
||||
|
||||
public int insertSelective(RenewalApplicationDO record) {
|
||||
return renewalApplicationMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public int updateByPrimaryKeySelective(RenewalApplicationDO record) {
|
||||
return renewalApplicationMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
public RenewalApplicationDO getById(Long id) {
|
||||
return renewalApplicationMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<RenewalApplicationListVO> queryRenewalApplicationList(RenewalApplicationQueryRequest request, List<String> regionIds) {
|
||||
return renewalApplicationMapper.queryRenewalApplicationList(request, regionIds);
|
||||
}
|
||||
|
||||
public RenewalApplicationDO getByApplicationNo(String applicationNo) {
|
||||
Example example = new Example(RenewalApplicationDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("applicationNo", applicationNo)
|
||||
.andEqualTo("isDeleted", 0);
|
||||
return renewalApplicationMapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询门店是否有正在进行的续签申请
|
||||
*/
|
||||
public boolean existOngoingRecord(String storeCode) {
|
||||
Example example = new Example(RenewalApplicationDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("storeCode", storeCode)
|
||||
.andEqualTo("isDeleted", 0)
|
||||
.andNotIn("status", Arrays.asList(40, 60, 70));
|
||||
return renewalApplicationMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.cool.store.dao.renewal;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.renewal.RenewalApplicationSignerInfoDO;
|
||||
import com.cool.store.mapper.renewal.RenewalApplicationSignerInfoMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 续签申请签约人信息快照DAO
|
||||
*
|
||||
* @author zx
|
||||
* @date 2026-04-28
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class RenewalApplicationSignerInfoDAO {
|
||||
|
||||
private final RenewalApplicationSignerInfoMapper mapper;
|
||||
|
||||
public int insertSelective(RenewalApplicationSignerInfoDO record) {
|
||||
return mapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public RenewalApplicationSignerInfoDO getByApplicationNo(String applicationNo) {
|
||||
Example example = new Example(RenewalApplicationSignerInfoDO.class);
|
||||
example.createCriteria().andEqualTo("applicationNo", applicationNo);
|
||||
return mapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量查询签约人信息
|
||||
*/
|
||||
public Map<String, RenewalApplicationSignerInfoDO> getByApplicationNos(Collection<String> applicationNos) {
|
||||
if (CollectionUtils.isEmpty(applicationNos)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Example example = new Example(RenewalApplicationSignerInfoDO.class);
|
||||
example.createCriteria().andIn("applicationNo", applicationNos);
|
||||
List<RenewalApplicationSignerInfoDO> list = mapper.selectByExample(example);
|
||||
return CollStreamUtil.toMap(list, RenewalApplicationSignerInfoDO::getApplicationNo, v -> v);
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.cool.store.dao.renewal;
|
||||
|
||||
import com.cool.store.entity.renewal.RenewalRenovateApprovalDO;
|
||||
import com.cool.store.mapper.renewal.RenewalRenovateApprovalMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Repository
|
||||
public class RenewalRenovateApprovalDAO {
|
||||
|
||||
@Resource
|
||||
private RenewalRenovateApprovalMapper renewalRenovateApprovalMapper;
|
||||
|
||||
public int insertSelective(RenewalRenovateApprovalDO record) {
|
||||
return renewalRenovateApprovalMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public RenewalRenovateApprovalDO getByApplicationNo(String applicationNo) {
|
||||
return renewalRenovateApprovalMapper.getByApplicationNo(applicationNo);
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.cool.store.dao.store;
|
||||
|
||||
import com.alibaba.excel.util.CollectionUtils;
|
||||
import com.cool.store.entity.store.StoreBusinessReportDO;
|
||||
import com.cool.store.mapper.store.StoreBusinessReportMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 门店营业数据报表DAO
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/4/28
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class StoreBusinessReportDAO {
|
||||
private final StoreBusinessReportMapper storeBusinessReportMapper;
|
||||
|
||||
/**
|
||||
* 批量新增或编辑
|
||||
*/
|
||||
public void insertOrUpdateBatch(List<StoreBusinessReportDO> list) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
storeBusinessReportMapper.insertOrUpdateBatch(list);
|
||||
}
|
||||
}
|
||||
@@ -15,10 +15,7 @@ public interface BigRegionMapper extends Mapper<BigRegionDO> {
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword,
|
||||
@Param("joinBrand") Integer joinBrand,
|
||||
@Param("type") Integer type,
|
||||
@Param("enable") Integer enable);
|
||||
List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword, @Param("joinBrand") Integer joinBrand, @Param("type") Integer type);
|
||||
|
||||
/**
|
||||
* 根据所属大区与加盟模式查询新管家信息
|
||||
@@ -32,6 +29,4 @@ public interface BigRegionMapper extends Mapper<BigRegionDO> {
|
||||
List<BigRegionDTO> queryBigRegion(@Param("request") QueryBigRegionRequest queryBigRegionRequest);
|
||||
|
||||
Integer updateHqtDate(BigRegionDO bigRegionDO);
|
||||
|
||||
List<BigRegionDO> getByRegionIdList(@Param("list") List<Long> regionIdList);
|
||||
}
|
||||
@@ -29,6 +29,4 @@ public interface FranchiseFeeMapper extends Mapper<FranchiseFeeDO> {
|
||||
Integer batchUpdateXgjCollectionStatus(@Param("shopIds")List<Long> shopId, @Param("collectionStatus")Integer collectionStatus);
|
||||
|
||||
Integer batchUpdateXgjCollectionStatusAndXgjFeesPaid( @Param("list") List<FranchiseFeeStageDateDTO> franchiseFeeStageDateDTOList);
|
||||
|
||||
Integer updatePayType(@Param("shopId") Long shopId, @Param("payType") Integer payType);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.cool.store.entity.LinePayDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -72,7 +71,5 @@ public interface LinePayMapper {
|
||||
|
||||
Integer deleteByShopId(@Param("list")List<Long> shopIds);
|
||||
|
||||
Integer updateAmountAndPayUserName(@Param("id") Long id, @Param("amount") BigDecimal amount, @Param("payUserName") String payUserName, @Param("userId") String userId);
|
||||
|
||||
LinePayDO getLastPay(@Param("shopId") Long shopId);
|
||||
}
|
||||
@@ -14,8 +14,6 @@ public interface OpeningOperationPlanMapper extends Mapper<OpeningOperationPlanD
|
||||
|
||||
OpeningOperationPlanDO selectByShopId(@Param("shopId") Long shopId);
|
||||
|
||||
List<OpeningOperationPlanDO> selectByShopIds(@Param("shopIds") List<Long> shopIds);
|
||||
|
||||
|
||||
Integer updateByShopId(@Param("shopId") Long shopId, @Param("auditId") Long auditId, @Param("resultType") Integer resultType);
|
||||
/**
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.ReceivingBankDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/06/18/17:33
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface ReceivingBankMapper extends Mapper<ReceivingBankDO> {
|
||||
|
||||
List<ReceivingBankDO> getByFranchiseBrandAndRegionId(@Param("franchiseBrandList") List<String> franchiseBrandList,@Param("regionIdList") List<Long> regionIdList);
|
||||
|
||||
Integer batchInsert(@Param("list") List<ReceivingBankDO> list);
|
||||
|
||||
Integer batchInsertOrUpdate(@Param("list") List<ReceivingBankDO> receivingBankDOList);
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import com.cool.store.dto.store.StoreAddressDTO;
|
||||
import com.cool.store.dto.store.StoreAreaDTO;
|
||||
import com.cool.store.dto.store.StoreExtendSoftOpenDTO;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.dto.store.StoreReportDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -146,21 +145,6 @@ public interface StoreMapper {
|
||||
*/
|
||||
List<StoreDO> getNoOrderStore(@Param("latestDate") LocalDate latestDate, @Param("businessTypes") List<String> businessTypes, @Param("inBusinessType") Boolean inBusinessType);
|
||||
|
||||
/**
|
||||
* 门店状态改为闭店
|
||||
* @param storeId 门店id
|
||||
*/
|
||||
int closeStore(@Param("storeId") String storeId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据区域id查询门店列表
|
||||
* @param regionIds 区域id
|
||||
* @param keyword 门店名称或门店编码
|
||||
* @return 门店列表
|
||||
*/
|
||||
List<StoreDO> getStoreByRegionIds(@Param("regionIds") List<String> regionIds, @Param("keyword") String keyword);
|
||||
|
||||
/**
|
||||
* 根据市统计门店数量
|
||||
* @param cityNames 市列表
|
||||
@@ -181,42 +165,20 @@ public interface StoreMapper {
|
||||
@Param("openStartTime") LocalDate openStartTime,
|
||||
@Param("openEndTime") LocalDate openEndTime);
|
||||
|
||||
/**
|
||||
* 根据区域id查询门店列表
|
||||
* @param regionIds 区域id
|
||||
* @param keyword 门店名称或门店编码
|
||||
* @return 门店列表
|
||||
*/
|
||||
List<StoreDO> getStoreByRegionIds(@Param("regionIds") List<String> regionIds, @Param("keyword") String keyword);
|
||||
|
||||
List<StoreAddressDTO> getStoreAddress(@Param("flag") Integer flag, @Param("storeCode") String storeCode);
|
||||
|
||||
int batchUpdateAddress(@Param("list") List<StoreDO> storeList);
|
||||
|
||||
String getPrivateSphereQrCode(@Param("storeId") String storeId);
|
||||
|
||||
|
||||
/**
|
||||
* 总营业门店数量统计
|
||||
*/
|
||||
List<StoreReportDTO> totalOpenStoreReport(@Param("date") String date,
|
||||
@Param("domestic") Integer domestic,
|
||||
@Param("joinBrandList") List<Integer> joinBrandList);
|
||||
|
||||
/**
|
||||
* 期初门店数
|
||||
*/
|
||||
List<StoreReportDTO> periodBeginStoreReport(@Param("date") String date,
|
||||
@Param("domestic") Integer domestic,
|
||||
@Param("joinBrandList") List<Integer> joinBrandList);
|
||||
|
||||
/**
|
||||
* 新开门店数
|
||||
*/
|
||||
List<StoreReportDTO> newOpenStoreReport(@Param("date") String date,
|
||||
@Param("domestic") Integer domestic,
|
||||
@Param("joinBrandList") List<Integer> joinBrandList);
|
||||
|
||||
/**
|
||||
* 闭店门店数
|
||||
*/
|
||||
List<StoreReportDTO> closeStoreReport(@Param("date") String date,
|
||||
@Param("domestic") Integer domestic,
|
||||
@Param("joinBrandList") List<Integer> joinBrandList);
|
||||
|
||||
|
||||
/**
|
||||
* 批量新增或编辑开始试营业日期
|
||||
*/
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.ThirdPartyAccountDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface ThirdPartyAccountMapper extends Mapper<ThirdPartyAccountDO> {
|
||||
|
||||
/**
|
||||
* 通过门店编码与手机号获取人员是否推送到猎聘
|
||||
* @param shopCode
|
||||
* @param mobile
|
||||
* @return
|
||||
*/
|
||||
ThirdPartyAccountDO getByCodeAndMobile(@Param("shopCode") String shopCode, @Param("mobile") String mobile);
|
||||
|
||||
|
||||
boolean exists(@Param("shopCode") String shopCode, @Param("mobile") String mobile);
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.ThirdPartyStoreDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface ThirdPartyStoreMapper extends Mapper<ThirdPartyStoreDO> {
|
||||
|
||||
/**
|
||||
* 根据门店code查询推送记录
|
||||
* @param storeCode
|
||||
* @return
|
||||
*/
|
||||
ThirdPartyStoreDO getByLocalStoreCode(@Param("storeCode") String storeCode);
|
||||
|
||||
/**
|
||||
* 门店是否存在
|
||||
* @param localStoreCode
|
||||
* @return
|
||||
*/
|
||||
boolean exists(@Param("localStoreCode") String localStoreCode);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.BigRegionUserDTO;
|
||||
import com.cool.store.entity.UserAuthMappingDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -113,12 +112,4 @@ public interface UserAuthMappingMapper {
|
||||
List<UserAuthMappingDO> listByUserIdListAndSource(@Param("userIdList") List<String> userIdList, @Param("source") String source);
|
||||
|
||||
List<UserAuthMappingDO> getAllByUserIds(@Param("userIdsByRoleIdList") List<String> userIdsByRoleIdList);
|
||||
|
||||
/**
|
||||
* 查询指定大区 且管辖该大区的指定角色的人
|
||||
* @param regionIds
|
||||
* @param roleName
|
||||
* @return
|
||||
*/
|
||||
List<BigRegionUserDTO> getBigRegionByUserId(List<Long> regionIds, String roleName);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.cool.store.mapper.approval;
|
||||
|
||||
import com.cool.store.entity.approval.CommonApprovalLogDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CommonApprovalLogMapper extends Mapper<CommonApprovalLogDO> {
|
||||
|
||||
/**
|
||||
* 根据申请编号查询所有审批记录
|
||||
*/
|
||||
List<CommonApprovalLogDO> getByApplicationNo(@Param("applicationNo") String applicationNo);
|
||||
|
||||
/**
|
||||
* 批量插入审批记录
|
||||
*/
|
||||
int batchInsert(@Param("list") List<CommonApprovalLogDO> list);
|
||||
|
||||
/**
|
||||
* 批量更新审批记录
|
||||
*/
|
||||
int batchUpdate(@Param("list") List<CommonApprovalLogDO> list);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.cool.store.mapper.contract;
|
||||
|
||||
import com.cool.store.entity.contract.ContractCostDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ContractCostMapper extends Mapper<ContractCostDO> {
|
||||
|
||||
/**
|
||||
* 根据合同编号查询费用列表
|
||||
*/
|
||||
List<ContractCostDO> queryByContractNo(@Param("contractNo") String contractNo);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.cool.store.mapper.contract;
|
||||
|
||||
import com.cool.store.entity.contract.ContractMasterDO;
|
||||
import com.cool.store.request.contract.ContractMasterQueryRequest;
|
||||
import com.cool.store.vo.contract.ContractMasterListVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ContractMasterMapper extends Mapper<ContractMasterDO> {
|
||||
|
||||
/**
|
||||
* 查询合同列表(关联门店表)
|
||||
*/
|
||||
List<ContractMasterListVO> queryContractMasterList(@Param("request") ContractMasterQueryRequest request);
|
||||
|
||||
/**
|
||||
* 查询即将到期的合同(未生成续签申请)
|
||||
*/
|
||||
List<ContractMasterDO> queryContractsNearExpiry(@Param("days") int days);
|
||||
|
||||
/**
|
||||
* 根据门店编码查询最新合同
|
||||
*/
|
||||
ContractMasterDO getLatestContractByStoreCode(@Param("storeCode") String storeCode);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.cool.store.mapper.exam;
|
||||
|
||||
import com.cool.store.entity.exam.ExamAttemptAnswerDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ExamAttemptAnswerMapper extends Mapper<ExamAttemptAnswerDO> {
|
||||
|
||||
/**
|
||||
* 插入或更新答案
|
||||
*/
|
||||
int insertOrUpdate(ExamAttemptAnswerDO record);
|
||||
|
||||
/**
|
||||
* 批量插入或更新答案
|
||||
*/
|
||||
int batchInsertOrUpdate(List<ExamAttemptAnswerDO> list);
|
||||
|
||||
/**
|
||||
* 批量更新分数
|
||||
*/
|
||||
int batchUpdateScore(List<ExamAttemptAnswerDO> list);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.cool.store.mapper.exam;
|
||||
|
||||
import com.cool.store.entity.exam.ExamAttemptDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ExamAttemptMapper extends Mapper<ExamAttemptDO> {
|
||||
|
||||
/**
|
||||
* 查询参考人数
|
||||
* @param examInfoIds 考试信息id列表
|
||||
* @return 参考人数
|
||||
*/
|
||||
List<Map<String, Object>> getAttemptCount(@Param("examInfoIds") List<Long> examInfoIds);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.cool.store.mapper.exam;
|
||||
|
||||
import com.cool.store.entity.exam.ExamInfoDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface ExamInfoMapper extends Mapper<ExamInfoDO> {
|
||||
|
||||
/**
|
||||
* 通过token查询考试信息
|
||||
*/
|
||||
ExamInfoDO selectByToken(String token);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.cool.store.mapper.exam;
|
||||
|
||||
import com.cool.store.entity.exam.ExamPaperDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface ExamPaperMapper extends Mapper<ExamPaperDO> {
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.cool.store.mapper.exam;
|
||||
|
||||
import com.cool.store.entity.exam.ExamPaperQuestionDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ExamPaperQuestionMapper extends Mapper<ExamPaperQuestionDO> {
|
||||
|
||||
/**
|
||||
* 批量插入试卷题目
|
||||
*/
|
||||
int insertBatch(@Param("list") List<ExamPaperQuestionDO> list);
|
||||
|
||||
/**
|
||||
* 根据试卷ID批量删除(逻辑删除)
|
||||
*/
|
||||
int deleteByPaperId(@Param("paperId") Long paperId, @Param("updateTime") java.util.Date updateTime);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.cool.store.mapper.exam;
|
||||
|
||||
import com.cool.store.entity.exam.ExamQuestionDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface ExamQuestionMapper extends Mapper<ExamQuestionDO> {
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.cool.store.mapper.renewal;
|
||||
|
||||
import com.cool.store.entity.renewal.RenewalApplicationDO;
|
||||
import com.cool.store.request.renewal.RenewalApplicationQueryRequest;
|
||||
import com.cool.store.vo.renewal.RenewalApplicationListVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RenewalApplicationMapper extends Mapper<RenewalApplicationDO> {
|
||||
|
||||
/**
|
||||
* 查询续签申请列表(关联门店、签约人表)
|
||||
*/
|
||||
List<RenewalApplicationListVO> queryRenewalApplicationList(@Param("request") RenewalApplicationQueryRequest request,
|
||||
@Param("regionIds") List<String> regionIds);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.cool.store.mapper.renewal;
|
||||
|
||||
import com.cool.store.entity.renewal.RenewalApplicationSignerInfoDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
/**
|
||||
* 续签申请签约人信息快照Mapper
|
||||
*
|
||||
* @author zx
|
||||
* @date 2026-04-28
|
||||
*/
|
||||
public interface RenewalApplicationSignerInfoMapper extends Mapper<RenewalApplicationSignerInfoDO> {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.cool.store.mapper.renewal;
|
||||
|
||||
import com.cool.store.entity.renewal.RenewalRenovateApprovalDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface RenewalRenovateApprovalMapper extends Mapper<RenewalRenovateApprovalDO> {
|
||||
|
||||
/**
|
||||
* 根据申请编号查询翻新信息
|
||||
*/
|
||||
RenewalRenovateApprovalDO getByApplicationNo(@Param("applicationNo") String applicationNo);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.cool.store.mapper.store;
|
||||
|
||||
import com.cool.store.entity.store.StoreBusinessReportDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2026-04-28 06:58
|
||||
*/
|
||||
public interface StoreBusinessReportMapper {
|
||||
/**
|
||||
*
|
||||
* 默认插入方法,只会给有值的字段赋值
|
||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
||||
* dateTime:2026-04-28 06:58
|
||||
*/
|
||||
int insertSelective(@Param("record") StoreBusinessReportDO record, @Param("enterpriseId") String enterpriseId);
|
||||
|
||||
/**
|
||||
*
|
||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
||||
* dateTime:2026-04-28 06:58
|
||||
*/
|
||||
int updateByPrimaryKeySelective(@Param("record") StoreBusinessReportDO record, @Param("enterpriseId") String enterpriseId);
|
||||
|
||||
/**
|
||||
* 批量新增或编辑
|
||||
*/
|
||||
void insertOrUpdateBatch(@Param("list") List<StoreBusinessReportDO> list);
|
||||
}
|
||||
@@ -97,9 +97,6 @@
|
||||
<if test="request.expenseSheetType != null and request.expenseSheetType != ''">
|
||||
and a.expense_sheet_type = #{request.expenseSheetType}
|
||||
</if>
|
||||
<if test="request.createUserId != null and request.createUserId != ''">
|
||||
and a.create_user_id = #{request.createUserId}
|
||||
</if>
|
||||
<if test="request.regionIds != null and !request.regionIds.isEmpty()">
|
||||
AND <foreach collection="request.regionIds" item="regionId" separator=" OR " open="(" close=")">
|
||||
b.region_path LIKE CONCAT('%/', #{regionId}, '/%')
|
||||
|
||||
@@ -45,9 +45,6 @@
|
||||
<if test="type != null">
|
||||
and type = #{type}
|
||||
</if>
|
||||
<if test="enable !=null">
|
||||
and enable_flag = #{enable}
|
||||
</if>
|
||||
</where>
|
||||
order by
|
||||
enable_flag desc,
|
||||
@@ -99,15 +96,4 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="getByRegionIdList" resultType="com.cool.store.entity.BigRegionDO">
|
||||
select DISTINCT
|
||||
group_name as groupName,
|
||||
region_id as regionId,
|
||||
region_name as regionName
|
||||
from `xfsg_big_region`
|
||||
where region_id in
|
||||
<foreach item="item" collection="list" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -48,11 +48,6 @@
|
||||
where shop_id = #{item.shopId}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updatePayType">
|
||||
update xfsg_franchise_fee
|
||||
set pay_type = #{payType}
|
||||
where shop_id = #{shopId}
|
||||
</update>
|
||||
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
|
||||
select *
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
<result column="actual_payment_amount" jdbcType="DECIMAL" property="actualPaymentAmount" />
|
||||
<result column="financial_remarks" jdbcType="VARCHAR" property="financialRemarks" />
|
||||
<result column="annex" jdbcType="VARCHAR" property="annex" />
|
||||
<result column="annex" jdbcType="VARCHAR" property="annex"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
@@ -29,14 +29,13 @@
|
||||
<result column="payment_receipt_code" jdbcType="VARCHAR" property="paymentReceiptCode"/>
|
||||
<result column="pay_serial_number" jdbcType="VARCHAR" property="paySerialNumber"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
<result column="xgj_fail_reason" jdbcType="VARCHAR" property="xgjFailReason"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
|
||||
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
|
||||
update_time, create_user_id, update_user_id,
|
||||
deleted,pay_business_type,amount,combined_field,xgj_claim_status,payment_receipt_code,pay_serial_number,
|
||||
remark,xgj_fail_reason
|
||||
remark
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
@@ -400,7 +399,7 @@
|
||||
</if>
|
||||
</select>
|
||||
<select id="getFranchiseFeePayInfoByShopId" resultType="com.cool.store.entity.LinePayDO">
|
||||
select * from xfsg_line_pay where deleted = 0 and shop_id = #{shopId} and pay_business_type = 1 order by
|
||||
select * from xfsg_line_pay where deleted = 0 and shop_id = #{shopId} and pay_business_type = 1 order by
|
||||
create_time desc
|
||||
</select>
|
||||
<select id="getDateHandler" resultType="com.cool.store.entity.LinePayDO">
|
||||
@@ -457,14 +456,5 @@
|
||||
</foreach>
|
||||
) and pay_business_type = #{payBusinessType}
|
||||
</update>
|
||||
<update id="updateAmountAndPayUserName">
|
||||
update xfsg_line_pay
|
||||
set
|
||||
amount = #{amount},
|
||||
pay_user_name = #{payUserName},
|
||||
update_time = now(),
|
||||
update_user_id = #{userId}
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
|
||||
@@ -23,16 +23,11 @@
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
|
||||
<result column="result_type" jdbcType="TINYINT" property="resultType"/>
|
||||
<result column="open_time" jdbcType="TIMESTAMP" property="openTime" />
|
||||
<result column="first_day_income" jdbcType="VARCHAR" property="firstDayIncome" />
|
||||
<result column="second_day_income" jdbcType="VARCHAR" property="secondDayIncome" />
|
||||
<result column="third_day_income" jdbcType="VARCHAR" property="thirdDayIncome" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id,shop_id,plan_source,survey_result,survey_result_url,activity_theme,activity_theme_url,
|
||||
submission_time,submitted_user_id,preparation_user_ids,route_completed,create_time,
|
||||
update_time,create_user_id,update_user_id,deleted,audit_id,result_type,open_time,
|
||||
first_day_income,second_day_income,third_day_income
|
||||
update_time,create_user_id,update_user_id,deleted,audit_id,result_type
|
||||
</sql>
|
||||
<update id="updateByShopId">
|
||||
update xfsg_opening_operation_plan
|
||||
@@ -49,20 +44,6 @@
|
||||
and
|
||||
deleted = 0
|
||||
</select>
|
||||
<select id="selectByShopIds" resultType="com.cool.store.entity.OpeningOperationPlanDO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
xfsg_opening_operation_plan
|
||||
where deleted = 0
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getOpenPlanShopListByCondition"
|
||||
resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
|
||||
select si.id as shopId, si.region_id AS regionId,si.line_id as lineId, si.shop_name as shopName,
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<?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">
|
||||
<!--mybatis-3-mapper.dtd:约束文件的名称,限制和检查在当前文件中出现的标签和属性符合mybatis的要求-->
|
||||
<!--namespace:命名空间,要有唯一的值,要求使用dao接口的权限定名称(一个dao接口对应一个mapper,namespace指明对应哪个dao接口)-->
|
||||
<mapper namespace="com.cool.store.mapper.ReceivingBankMapper">
|
||||
<!-- 所有的数据库操作都要写在mapper标签中,可以使用特定的标签表示数据库中的特定操作 -->
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.ReceivingBankDO">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="regionId" column="region_id" jdbcType="BIGINT"/>
|
||||
<result property="franchiseBrand" column="franchise_brand" jdbcType="INTEGER"/>
|
||||
<result property="payType" column="pay_type" jdbcType="TINYINT"/>
|
||||
<result property="payee" column="payee" jdbcType="VARCHAR"/>
|
||||
<result property="receivingAccount" column="receiving_account" jdbcType="VARCHAR"/>
|
||||
<result property="bankName" column="bank_name" jdbcType="VARCHAR"/>
|
||||
<result property="branchBankName" column="branch_bank_name" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
|
||||
<result property="updateUser" column="update_user" jdbcType="VARCHAR"/>
|
||||
<result property="deleted" column="deleted" jdbcType="TINYINT"/>
|
||||
</resultMap>
|
||||
<insert id="batchInsert">
|
||||
<foreach collection="list" separator=";" item="item">
|
||||
insert into
|
||||
xfsg_receiving_bank
|
||||
(region_id,franchise_brand,pay_type,payee,receiving_account,bank_name,
|
||||
branch_bank_name,create_time,update_time,create_user,update_user)
|
||||
values
|
||||
(#{item.regionId},#{item.franchiseBrand},#{item.payType},#{item.payee},
|
||||
#{item.receivingAccount},#{item.bankName},#{item.branchBankName},#{item.createTime},
|
||||
#{item.updateTime},#{item.createUser},#{item.updateUser})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertOrUpdate">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
INSERT INTO xfsg_receiving_bank (
|
||||
region_id, franchise_brand, pay_type, payee, receiving_account,
|
||||
bank_name, branch_bank_name, create_time, update_time, create_user, update_user
|
||||
) VALUES (
|
||||
#{item.regionId}, #{item.franchiseBrand}, #{item.payType},
|
||||
#{item.payee}, #{item.receivingAccount}, #{item.bankName},
|
||||
#{item.branchBankName}, #{item.createTime}, #{item.updateTime},
|
||||
#{item.createUser}, #{item.updateUser}
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
payee = VALUES(payee),
|
||||
receiving_account = VALUES(receiving_account),
|
||||
bank_name = VALUES(bank_name),
|
||||
branch_bank_name = VALUES(branch_bank_name),
|
||||
update_time = VALUES(update_time),
|
||||
update_user = VALUES(update_user)
|
||||
</foreach>
|
||||
</insert>
|
||||
<select id="getByFranchiseBrandAndRegionId" resultType="com.cool.store.entity.ReceivingBankDO">
|
||||
select * from xfsg_receiving_bank
|
||||
where deleted=0
|
||||
<if test="franchiseBrandList !=null and franchiseBrandList.size() >0">
|
||||
<foreach collection="franchiseBrandList" item="item" separator="," open="and franchise_brand in(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="regionIdList !=null and regionIdList.size() >0">
|
||||
<foreach collection="regionIdList" item="item" separator="," open="and region_id in(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -397,12 +397,6 @@
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="request.authInvestRegionIds != null and request.authInvestRegionIds.size() > 0">
|
||||
and a.invest_region_id in
|
||||
<foreach collection="request.authInvestRegionIds" item="investRegionId" index="index" open="(" separator="," close=")">
|
||||
#{investRegionId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.signStageStartTime != null and request.signStageEndTime">
|
||||
and d.actual_complete_time between #{request.signStageStartTime} and #{request.signStageEndTime}
|
||||
</if>
|
||||
|
||||
@@ -378,23 +378,6 @@
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getStoreByRegionIds" resultMap="BaseResultMap">
|
||||
SELECT * FROM store_${enterpriseId}
|
||||
<where>
|
||||
is_delete = 'effective' AND store_status != 'closed'
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (store_name LIKE concat('%', #{keyword}, '%') OR store_num LIKE concat('%', #{keyword}, '%'))
|
||||
</if>
|
||||
<if test="regionIds != null and !regionIds.isEmpty()">
|
||||
AND (
|
||||
<foreach collection="regionIds" item="regionId" separator=" OR ">
|
||||
region_path LIKE concat('%/', #{regionId}, '/%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="storeNumStatisticsByAd" resultType="java.util.Map">
|
||||
SELECT YEAR(open_date) year, province, city, COUNT(1) store_num, QUARTER(open_date) quarter
|
||||
FROM store_${enterpriseId}
|
||||
@@ -422,6 +405,22 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getStoreByRegionIds" resultMap="BaseResultMap">
|
||||
SELECT * FROM store_${enterpriseId}
|
||||
<where>
|
||||
is_delete = 'effective' AND store_status != 'closed'
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (store_name LIKE concat('%', #{keyword}, '%') OR store_num LIKE concat('%', #{keyword}, '%'))
|
||||
</if>
|
||||
<if test="regionIds != null and !regionIds.isEmpty()">
|
||||
AND (
|
||||
<foreach collection="regionIds" item="regionId" separator=" OR ">
|
||||
region_path LIKE concat('%/', #{regionId}, '/%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getStoreAddress" resultType="com.cool.store.dto.store.StoreAddressDTO">
|
||||
SELECT * FROM store_${enterpriseId}
|
||||
@@ -467,119 +466,6 @@
|
||||
WHERE store_id = #{storeId}
|
||||
</select>
|
||||
|
||||
<select id="totalOpenStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
|
||||
SELECT join_brand, COUNT(1) num
|
||||
FROM store_${enterpriseId} a
|
||||
<where>
|
||||
a.is_delete = 'effective'
|
||||
AND a.store_status IN ('open', 'close_up')
|
||||
<if test="joinBrandList != null and joinBrandList.size() > 0">
|
||||
AND a.join_brand IN
|
||||
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="date != null">
|
||||
AND DATE_FORMAT(a.open_date, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) <= #{date}
|
||||
</if>
|
||||
<if test="domestic != null and domestic == 2">
|
||||
AND LOCATE('_', a.store_num) > 0
|
||||
</if>
|
||||
<if test="domestic != null and domestic == 1">
|
||||
AND LOCATE('_', a.store_num) = 0
|
||||
</if>
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 1 AND a.store_num = b.store_num
|
||||
)
|
||||
</where>
|
||||
GROUP BY join_brand
|
||||
</select>
|
||||
|
||||
<select id="periodBeginStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
|
||||
SELECT join_brand, COUNT(1) num
|
||||
FROM store_${enterpriseId} a
|
||||
<where>
|
||||
a.is_delete = 'effective'
|
||||
<if test="joinBrandList != null and joinBrandList.size() > 0">
|
||||
AND a.join_brand IN
|
||||
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="date != null">
|
||||
AND DATE_FORMAT(a.open_date, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) < #{date}
|
||||
</if>
|
||||
<if test="domestic != null and domestic == 2">
|
||||
AND LOCATE('_', a.store_num) > 0
|
||||
</if>
|
||||
<if test="domestic != null and domestic == 1">
|
||||
AND LOCATE('_', a.store_num) = 0
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY join_brand
|
||||
</select>
|
||||
|
||||
<select id="newOpenStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
|
||||
SELECT join_brand, COUNT(1) num
|
||||
FROM store_${enterpriseId} a
|
||||
<where>
|
||||
a.is_delete = 'effective'
|
||||
AND a.store_status IN ('open', 'close_up', 'closed')
|
||||
<if test="joinBrandList != null and joinBrandList.size() > 0">
|
||||
AND a.join_brand IN
|
||||
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="date != null">
|
||||
AND DATE_FORMAT(a.open_date, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) = #{date}
|
||||
</if>
|
||||
<if test="domestic != null and domestic == 2">
|
||||
AND LOCATE('_', a.store_num) > 0
|
||||
</if>
|
||||
<if test="domestic != null and domestic == 1">
|
||||
AND LOCATE('_', a.store_num) = 0
|
||||
</if>
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 1 AND a.store_num = b.store_num
|
||||
)
|
||||
</where>
|
||||
GROUP BY join_brand
|
||||
</select>
|
||||
|
||||
<select id="closeStoreReport" resultType="com.cool.store.dto.store.StoreReportDTO">
|
||||
SELECT join_brand, COUNT(1) num
|
||||
FROM store_${enterpriseId} a
|
||||
<where>
|
||||
a.is_delete = 'effective'
|
||||
AND a.store_status = 'closed'
|
||||
<if test="joinBrandList != null and joinBrandList.size() > 0">
|
||||
AND a.join_brand IN
|
||||
<foreach collection="joinBrandList" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="date != null">
|
||||
AND DATE_FORMAT(a.close_store_time, CASE WHEN LENGTH(#{date}) = 4 THEN '%Y' ELSE '%Y-%m' END) = #{date}
|
||||
</if>
|
||||
<if test="domestic != null and domestic == 2">
|
||||
AND LOCATE('_', a.store_num) > 0
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 1 AND a.store_num = b.store_num AND b.domestic = 2
|
||||
)
|
||||
</if>
|
||||
<if test="domestic != null and domestic == 1">
|
||||
AND LOCATE('_', a.store_num) = 0
|
||||
</if>
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM store_business_report_exclude_${enterpriseId} b WHERE b.type = 2 AND a.store_num = b.store_num
|
||||
)
|
||||
</where>
|
||||
GROUP BY join_brand
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<insert id="insertOrUpdateSoftOpenDate">
|
||||
INSERT INTO store_extend_info_${enterpriseId}(store_id, soft_open_date)
|
||||
VALUES
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<?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.cool.store.mapper.ThirdPartyAccountMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.ThirdPartyAccountDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||
<result column="local_store_code" jdbcType="VARCHAR" property="localStoreCode" />
|
||||
<result column="third_party_account_id" jdbcType="VARCHAR" property="thirdPartyAccountId" />
|
||||
<result column="third_party_store_id" jdbcType="VARCHAR" property="thirdPartyStoreId" />
|
||||
<result column="account_type" jdbcType="TINYINT" property="accountType" />
|
||||
<result column="position_id" jdbcType="TINYINT" property="positionId" />
|
||||
<result column="is_valid" jdbcType="TINYINT" property="isValid" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="getByCodeAndMobile" resultMap="BaseResultMap">
|
||||
select * from xfsg_third_party_account
|
||||
where is_valid = 1
|
||||
<if test="shopCode!=null and shopCode!=''">
|
||||
and local_store_code = #{shopCode}
|
||||
</if>
|
||||
<if test="mobile!=null and mobile!=''">
|
||||
and mobile = #{mobile}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="exists" resultType="boolean">
|
||||
SELECT COUNT(1) > 0 FROM xfsg_third_party_store
|
||||
WHERE local_store_code = #{storeCode} and mobile = #{mobile}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?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.cool.store.mapper.ThirdPartyStoreMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.ThirdPartyStoreDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="local_store_code" jdbcType="VARCHAR" property="localStoreCode" />
|
||||
<result column="third_party_store_url" jdbcType="VARCHAR" property="thirdPartyStoreUrl" />
|
||||
<result column="third_party_store_id" jdbcType="VARCHAR" property="thirdPartyStoreId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="getByLocalStoreCode" resultMap="BaseResultMap">
|
||||
select * from xfsg_third_party_store
|
||||
<where>
|
||||
<if test="storeCode!=null and storeCode!=''">
|
||||
and local_store_code = #{storeCode}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="exists" resultType="boolean">
|
||||
SELECT COUNT(1) > 0 FROM xfsg_third_party_store
|
||||
WHERE local_store_code = #{localStoreCode}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -214,32 +214,4 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getBigRegionByUserId" resultType="com.cool.store.dto.BigRegionUserDTO">
|
||||
select
|
||||
b.`name` as name,
|
||||
b.`mobile` as mobiel ,
|
||||
e.`name` as regionName,
|
||||
e.id as regionId
|
||||
from
|
||||
`user_auth_mapping_${enterpriseId}` a
|
||||
left join `enterprise_user_${enterpriseId}` b on a.`user_id` = b.`user_id`
|
||||
left join `enterprise_user_role_${enterpriseId}` c on a.`user_id` = c.`user_id`
|
||||
left join `sys_role_${enterpriseId}` d on c.`role_id` = d.`id`
|
||||
left join `region_${enterpriseId}` e on e.id = a.`mapping_id`
|
||||
<where>
|
||||
<if test="regionIds!=null and regionIds.size>0">
|
||||
and a.`mapping_id` in
|
||||
<foreach collection="regionIds" item="regionId" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="roleName!=null and roleName!=''">
|
||||
and d.`role_name` = #{roleName}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -15,9 +15,7 @@
|
||||
fail_reason AS failReason,
|
||||
create_user_id AS createUserId,
|
||||
create_time AS createTime,
|
||||
update_time AS updateTime,
|
||||
relate_store_id AS relateStoreId,
|
||||
remark
|
||||
update_time AS updateTime
|
||||
FROM zxjp_withdraw_application
|
||||
WHERE 1=1
|
||||
<if test="request.withdrawNo != null and request.withdrawNo != ''">
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
<?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.cool.store.mapper.approval.CommonApprovalLogMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.approval.CommonApprovalLogDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="application_no" jdbcType="VARCHAR" property="applicationNo" />
|
||||
<result column="node_code" jdbcType="VARCHAR" property="nodeCode" />
|
||||
<result column="node_name" jdbcType="VARCHAR" property="nodeName" />
|
||||
<result column="handle_user_id" jdbcType="VARCHAR" property="handleUserId" />
|
||||
<result column="handle_user_name" jdbcType="VARCHAR" property="handleUserName" />
|
||||
<result column="result" jdbcType="VARCHAR" property="result" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="version" jdbcType="INTEGER" property="version" />
|
||||
<result column="comment" jdbcType="VARCHAR" property="comment" />
|
||||
<result column="operate_time" jdbcType="TIMESTAMP" property="operateTime" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getByApplicationNo" resultMap="BaseResultMap">
|
||||
SELECT * FROM zxjp_common_approval_log
|
||||
WHERE application_no = #{applicationNo}
|
||||
AND deleted = 0
|
||||
ORDER BY version ASC, id ASC
|
||||
</select>
|
||||
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO zxjp_common_approval_log (application_no, node_code, node_name, handle_user_id, handle_user_name, result, status, version, comment, operate_time)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.applicationNo}, #{item.nodeCode}, #{item.nodeName}, #{item.handleUserId}, #{item.handleUserName}, #{item.result}, #{item.status}, #{item.version}, #{item.comment}, #{item.operateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
UPDATE zxjp_common_approval_log
|
||||
SET status = #{item.status},
|
||||
comment = #{item.comment},
|
||||
operate_time = #{item.operateTime}
|
||||
<if test="item.result != null">, result = #{item.result}</if>
|
||||
WHERE id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?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.cool.store.mapper.contract.ContractCostMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.contract.ContractCostDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
|
||||
<result column="join_fee_amount" jdbcType="DECIMAL" property="joinFeeAmount" />
|
||||
<result column="join_fee_frequency_years" jdbcType="DECIMAL" property="joinFeeFrequencyYears" />
|
||||
<result column="join_fee_discount_amount" jdbcType="DECIMAL" property="joinFeeDiscountAmount" />
|
||||
<result column="join_fee_discount_reason" jdbcType="VARCHAR" property="joinFeeDiscountReason" />
|
||||
<result column="brand_usage_fee_amount" jdbcType="DECIMAL" property="brandUsageFeeAmount" />
|
||||
<result column="brand_usage_fee_frequency_years" jdbcType="DECIMAL" property="brandUsageFeeFrequencyYears" />
|
||||
<result column="brand_management_fee_amount" jdbcType="DECIMAL" property="brandManagementFeeAmount" />
|
||||
<result column="brand_management_fee_frequency_years" jdbcType="DECIMAL" property="brandManagementFeeFrequencyYears" />
|
||||
<result column="design_fee_amount" jdbcType="DECIMAL" property="designFeeAmount" />
|
||||
<result column="system_usage_fee_amount" jdbcType="DECIMAL" property="systemUsageFeeAmount" />
|
||||
<result column="performance_bond_amount" jdbcType="DECIMAL" property="performanceBondAmount" />
|
||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="queryByContractNo" resultMap="BaseResultMap">
|
||||
SELECT * FROM zxjp_contract_cost
|
||||
WHERE contract_no = #{contractNo}
|
||||
ORDER BY id ASC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,74 +0,0 @@
|
||||
<?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.cool.store.mapper.contract.ContractMasterMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.contract.ContractMasterDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="contract_type" jdbcType="VARCHAR" property="contractType" />
|
||||
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
|
||||
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
|
||||
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||
<result column="brand_name" jdbcType="VARCHAR" property="brandName" />
|
||||
<result column="source" jdbcType="VARCHAR" property="source" />
|
||||
<result column="sign_form" jdbcType="VARCHAR" property="signForm" />
|
||||
<result column="contract_years" jdbcType="DECIMAL" property="contractYears" />
|
||||
<result column="start_date" jdbcType="DATE" property="startDate" />
|
||||
<result column="end_date" jdbcType="DATE" property="endDate" />
|
||||
<result column="contract_status" jdbcType="VARCHAR" property="contractStatus" />
|
||||
<result column="currency" jdbcType="VARCHAR" property="currency" />
|
||||
<result column="sign_date" jdbcType="DATE" property="signDate" />
|
||||
<result column="related_contract_no" jdbcType="VARCHAR" property="relatedContractNo" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="renewal_created" jdbcType="TINYINT" property="renewalCreated" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="queryContractMasterList" resultType="com.cool.store.vo.contract.ContractMasterListVO">
|
||||
SELECT a.id AS contractId, a.contract_type, a.contract_no, a.store_code, a.brand_name,
|
||||
a.source, a.sign_form, a.contract_years, a.start_date, a.end_date,
|
||||
a.contract_status, a.remark, a.related_contract_no, a.create_user_id, a.created_time
|
||||
<if test="request.storeNameOrCode != null and request.storeNameOrCode != ''">
|
||||
, c.store_name
|
||||
</if>
|
||||
FROM zxjp_contract_master a
|
||||
<if test="request.storeNameOrCode != null and request.storeNameOrCode != ''">
|
||||
LEFT JOIN store_${enterpriseId} c ON a.store_code = c.store_num
|
||||
</if>
|
||||
<where>
|
||||
<if test="request.contractNo != null and request.contractNo != ''">
|
||||
AND a.contract_no LIKE CONCAT('%', #{request.contractNo}, '%')
|
||||
</if>
|
||||
<if test="request.storeNameOrCode != null and request.storeNameOrCode != ''">
|
||||
AND (c.store_name LIKE CONCAT('%', #{request.storeNameOrCode}, '%') OR c.store_num LIKE CONCAT('%', #{request.storeNameOrCode}, '%'))
|
||||
</if>
|
||||
<if test="request.endDateStart != null">
|
||||
AND a.end_date >= #{request.endDateStart}
|
||||
</if>
|
||||
<if test="request.endDateEnd != null">
|
||||
AND a.end_date <= #{request.endDateEnd}
|
||||
</if>
|
||||
<if test="request.brandName != null and request.brandName != ''">
|
||||
AND a.brand_name = #{request.brandName}
|
||||
</if>
|
||||
<if test="request.contractType != null and request.contractType != ''">
|
||||
AND a.contract_type = #{request.contractType}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.created_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryContractsNearExpiry" resultMap="BaseResultMap">
|
||||
SELECT * FROM zxjp_contract_master
|
||||
WHERE end_date BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL #{days} DAY)
|
||||
AND renewal_created = 0
|
||||
ORDER BY end_date ASC
|
||||
</select>
|
||||
|
||||
<select id="getLatestContractByStoreCode" resultMap="BaseResultMap">
|
||||
SELECT * FROM zxjp_contract_master
|
||||
WHERE store_code = #{storeCode}
|
||||
ORDER BY end_date DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,48 +0,0 @@
|
||||
<?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.cool.store.mapper.exam.ExamAttemptAnswerMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamAttemptAnswerDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="attempt_id" jdbcType="BIGINT" property="attemptId" />
|
||||
<result column="paper_id" jdbcType="BIGINT" property="paperId" />
|
||||
<result column="paper_question_id" jdbcType="BIGINT" property="paperQuestionId" />
|
||||
<result column="answer" jdbcType="VARCHAR" property="answer" />
|
||||
<result column="score" jdbcType="DECIMAL" property="score" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertOrUpdate" parameterType="com.cool.store.entity.exam.ExamAttemptAnswerDO">
|
||||
INSERT INTO zxjp_exam_attempt_answer (attempt_id, paper_id, paper_question_id, answer, score, create_user_id)
|
||||
VALUES (#{attemptId}, #{paperId}, #{paperQuestionId}, #{answer}, #{score}, #{createUserId})
|
||||
ON DUPLICATE KEY UPDATE
|
||||
answer = #{answer}, score = #{score}
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsertOrUpdate" parameterType="java.util.List">
|
||||
INSERT INTO zxjp_exam_attempt_answer (attempt_id, paper_id, paper_question_id, answer, score, create_user_id)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.attemptId}, #{item.paperId}, #{item.paperQuestionId}, #{item.answer}, #{item.score}, #{item.createUserId})
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
answer = VALUES(answer), score = VALUES(score)
|
||||
</insert>
|
||||
|
||||
<update id="batchUpdateScore" parameterType="java.util.List">
|
||||
UPDATE zxjp_exam_attempt_answer SET
|
||||
score = CASE id
|
||||
<foreach collection="list" item="item">
|
||||
WHEN #{item.id} THEN #{item.score}
|
||||
</foreach>
|
||||
END
|
||||
WHERE id IN
|
||||
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,33 +0,0 @@
|
||||
<?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.cool.store.mapper.exam.ExamAttemptMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamAttemptDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="exam_id" jdbcType="BIGINT" property="examId" />
|
||||
<result column="paper_id" jdbcType="BIGINT" property="paperId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="deadline_time" jdbcType="TIMESTAMP" property="deadlineTime" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="submit_type" jdbcType="INTEGER" property="submitType" />
|
||||
<result column="total_score" jdbcType="DECIMAL" property="totalScore" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getAttemptCount" resultType="java.util.Map">
|
||||
SELECT COUNT(1) AS attempt_count, exam_id FROM zxjp_exam_attempt
|
||||
WHERE exam_id IN
|
||||
<foreach item="item" collection="examInfoIds" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
GROUP BY exam_id
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?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.cool.store.mapper.exam.ExamInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamInfoDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="paper_id" jdbcType="BIGINT" property="paperId" />
|
||||
<result column="exam_name" jdbcType="VARCHAR" property="examName" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="duration_minutes" jdbcType="INTEGER" property="durationMinutes" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="entry_token" jdbcType="VARCHAR" property="entryToken" />
|
||||
<result column="qrcode_url" jdbcType="VARCHAR" property="qrcodeUrl" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="INTEGER" property="deleted" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByToken" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
SELECT * FROM zxjp_exam_info
|
||||
WHERE entry_token = #{token} AND deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?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.cool.store.mapper.exam.ExamPaperMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamPaperDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="paper_name" jdbcType="VARCHAR" property="paperName" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="total_score" jdbcType="DECIMAL" property="totalScore" />
|
||||
<result column="enable" jdbcType="INTEGER" property="enable" />
|
||||
<result column="start_exam" jdbcType="INTEGER" property="startExam" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="INTEGER" property="deleted" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -1,44 +0,0 @@
|
||||
<?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.cool.store.mapper.exam.ExamPaperQuestionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamPaperQuestionDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="paper_id" jdbcType="BIGINT" property="paperId" />
|
||||
<result column="question_id" jdbcType="BIGINT" property="questionId" />
|
||||
<result column="type" jdbcType="INTEGER" property="type" />
|
||||
<result column="difficulty" jdbcType="INTEGER" property="difficulty" />
|
||||
<result column="answer" jdbcType="VARCHAR" property="answer" />
|
||||
<result column="score" jdbcType="DECIMAL" property="score" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="INTEGER" property="deleted" />
|
||||
<result column="question_stem" jdbcType="LONGVARCHAR" property="questionStem" />
|
||||
<result column="analysis" jdbcType="LONGVARCHAR" property="analysis" />
|
||||
<result column="options" jdbcType="LONGVARCHAR" property="options" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 批量插入试卷题目 -->
|
||||
<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO zxjp_exam_paper_question (
|
||||
paper_id, question_id, type, difficulty, answer, score,
|
||||
question_stem, analysis, options, deleted, create_user_id, create_time, update_time
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.paperId}, #{item.questionId}, #{item.type}, #{item.difficulty}, #{item.answer}, #{item.score},
|
||||
#{item.questionStem}, #{item.analysis}, #{item.options}, #{item.deleted}, #{item.createUserId}, #{item.createTime}, #{item.updateTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 根据试卷ID批量删除(逻辑删除) -->
|
||||
<update id="deleteByPaperId">
|
||||
UPDATE zxjp_exam_paper_question
|
||||
SET deleted = 1, update_time = #{updateTime}
|
||||
WHERE paper_id = #{paperId} AND deleted = 0
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?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.cool.store.mapper.exam.ExamQuestionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.exam.ExamQuestionDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="type" jdbcType="INTEGER" property="type" />
|
||||
<result column="difficulty" jdbcType="INTEGER" property="difficulty" />
|
||||
<result column="enable" jdbcType="INTEGER" property="enable" />
|
||||
<result column="answer" jdbcType="VARCHAR" property="answer" />
|
||||
<result column="score" jdbcType="DECIMAL" property="score" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="INTEGER" property="deleted" />
|
||||
<result column="question_stem" jdbcType="LONGVARCHAR" property="questionStem" />
|
||||
<result column="analysis" jdbcType="LONGVARCHAR" property="analysis" />
|
||||
<result column="options" jdbcType="LONGVARCHAR" property="options" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -1,61 +0,0 @@
|
||||
<?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.cool.store.mapper.renewal.RenewalApplicationMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.renewal.RenewalApplicationDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="application_no" jdbcType="VARCHAR" property="applicationNo" />
|
||||
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||
<result column="original_contract_no" jdbcType="VARCHAR" property="originalContractNo" />
|
||||
<result column="contract_expire_date" jdbcType="DATE" property="contractExpireDate" />
|
||||
<result column="is_deleted" jdbcType="TINYINT" property="isDeleted" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="other_method" jdbcType="TINYINT" property="otherMethod" />
|
||||
<result column="is_renovate" jdbcType="TINYINT" property="isRenovate" />
|
||||
<result column="apply_time" jdbcType="TIMESTAMP" property="applyTime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="create_user_name" jdbcType="VARCHAR" property="createUserName" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="queryRenewalApplicationList" resultType="com.cool.store.vo.renewal.RenewalApplicationListVO">
|
||||
SELECT a.id AS renewalId, a.application_no, a.store_code, a.contract_expire_date,
|
||||
a.is_renovate, a.status, c.join_brand, c.store_name, c.store_address, c.join_brand AS brandName
|
||||
FROM zxjp_renewal_application a
|
||||
LEFT JOIN store_${enterpriseId} c ON a.store_code = c.store_num
|
||||
<where>
|
||||
a.is_deleted = 0
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
AND (c.store_name LIKE CONCAT('%', #{request.keyword}, '%') OR c.store_num LIKE CONCAT('%', #{request.keyword}, '%'))
|
||||
</if>
|
||||
<if test="request.regionId != null">
|
||||
AND c.region_path LIKE CONCAT('%/', #{request.regionId}, '/%')
|
||||
</if>
|
||||
<if test="regionIds != null and !regionIds.isEmpty()">
|
||||
AND <foreach collection="regionIds" item="regionId" separator=" OR " open="(" close=")">
|
||||
c.region_path LIKE CONCAT('%/', #{regionId}, '/%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.contractStartDateStart != null">
|
||||
AND a.contract_expire_date >= #{request.contractStartDateStart}
|
||||
</if>
|
||||
<if test="request.contractStartDateEnd != null">
|
||||
AND a.contract_expire_date <= #{request.contractStartDateEnd}
|
||||
</if>
|
||||
<if test="request.contractEndDateStart != null">
|
||||
AND a.contract_expire_date >= #{request.contractEndDateStart}
|
||||
</if>
|
||||
<if test="request.contractEndDateEnd != null">
|
||||
AND a.contract_expire_date <= #{request.contractEndDateEnd}
|
||||
</if>
|
||||
<if test="request.isRenovate != null">
|
||||
AND a.is_renovate = #{request.isRenovate}
|
||||
</if>
|
||||
<if test="request.status != null">
|
||||
AND a.status = #{request.status}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.created_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?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.cool.store.mapper.renewal.RenewalApplicationSignerInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.renewal.RenewalApplicationSignerInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="application_no" jdbcType="VARCHAR" property="applicationNo"/>
|
||||
<result column="signer1_name" jdbcType="VARCHAR" property="signer1Name"/>
|
||||
<result column="signer1_mobile" jdbcType="VARCHAR" property="signer1Mobile"/>
|
||||
<result column="signer2_name" jdbcType="VARCHAR" property="signer2Name"/>
|
||||
<result column="signer2_mobile" jdbcType="VARCHAR" property="signer2Mobile"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createdTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updatedTime"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?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.cool.store.mapper.renewal.RenewalRenovateApprovalMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.renewal.RenewalRenovateApprovalDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="application_no" jdbcType="VARCHAR" property="applicationNo" />
|
||||
<result column="shop_area_id" jdbcType="BIGINT" property="shopAreaId" />
|
||||
<result column="decoration_attributes" jdbcType="VARCHAR" property="decorationAttributes" />
|
||||
<result column="decoration_level" jdbcType="VARCHAR" property="decorationLevel" />
|
||||
<result column="decoration_requirement" jdbcType="VARCHAR" property="decorationRequirement" />
|
||||
<result column="special_instruction" jdbcType="VARCHAR" property="specialInstruction" />
|
||||
<result column="video_url" jdbcType="VARCHAR" property="videoUrl" />
|
||||
<result column="shop_front_photo_url" jdbcType="VARCHAR" property="shopFrontPhotoUrl" />
|
||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getByApplicationNo" resultMap="BaseResultMap">
|
||||
SELECT * FROM zxjp_renewal_renovate_approval
|
||||
WHERE application_no = #{applicationNo}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,128 +0,0 @@
|
||||
<?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.cool.store.mapper.store.StoreBusinessReportMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.store.StoreBusinessReportDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="join_brand" jdbcType="TINYINT" property="joinBrand" />
|
||||
<result column="domestic" jdbcType="BIT" property="domestic" />
|
||||
<result column="date" jdbcType="VARCHAR" property="date" />
|
||||
<result column="open_total_num" jdbcType="INTEGER" property="openTotalNum" />
|
||||
<result column="period_begin_num" jdbcType="INTEGER" property="periodBeginNum" />
|
||||
<result column="new_open_num" jdbcType="INTEGER" property="newOpenNum" />
|
||||
<result column="close_num" jdbcType="INTEGER" property="closeNum" />
|
||||
<result column="period_end_num" jdbcType="INTEGER" property="periodEndNum" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, join_brand, domestic, date, open_total_num, period_begin_num, new_open_num, close_num,
|
||||
period_end_num, create_time
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into store_business_report_${enterpriseId}
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.joinBrand != null">
|
||||
join_brand,
|
||||
</if>
|
||||
<if test="record.domestic != null">
|
||||
domestic,
|
||||
</if>
|
||||
<if test="record.date != null">
|
||||
date,
|
||||
</if>
|
||||
<if test="record.openTotalNum != null">
|
||||
open_total_num,
|
||||
</if>
|
||||
<if test="record.periodBeginNum != null">
|
||||
period_begin_num,
|
||||
</if>
|
||||
<if test="record.newOpenNum != null">
|
||||
new_open_num,
|
||||
</if>
|
||||
<if test="record.closeNum != null">
|
||||
close_num,
|
||||
</if>
|
||||
<if test="record.periodEndNum != null">
|
||||
period_end_num,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.joinBrand != null">
|
||||
#{record.joinBrand},
|
||||
</if>
|
||||
<if test="record.domestic != null">
|
||||
#{record.domestic},
|
||||
</if>
|
||||
<if test="record.date != null">
|
||||
#{record.date},
|
||||
</if>
|
||||
<if test="record.openTotalNum != null">
|
||||
#{record.openTotalNum},
|
||||
</if>
|
||||
<if test="record.periodBeginNum != null">
|
||||
#{record.periodBeginNum},
|
||||
</if>
|
||||
<if test="record.newOpenNum != null">
|
||||
#{record.newOpenNum},
|
||||
</if>
|
||||
<if test="record.closeNum != null">
|
||||
#{record.closeNum},
|
||||
</if>
|
||||
<if test="record.periodEndNum != null">
|
||||
#{record.periodEndNum},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update store_business_report_${enterpriseId}
|
||||
<set>
|
||||
<if test="record.joinBrand != null">
|
||||
join_brand = #{record.joinBrand},
|
||||
</if>
|
||||
<if test="record.domestic != null">
|
||||
domestic = #{record.domestic},
|
||||
</if>
|
||||
<if test="record.date != null">
|
||||
date = #{record.date},
|
||||
</if>
|
||||
<if test="record.openTotalNum != null">
|
||||
open_total_num = #{record.openTotalNum},
|
||||
</if>
|
||||
<if test="record.periodBeginNum != null">
|
||||
period_begin_num = #{record.periodBeginNum},
|
||||
</if>
|
||||
<if test="record.newOpenNum != null">
|
||||
new_open_num = #{record.newOpenNum},
|
||||
</if>
|
||||
<if test="record.closeNum != null">
|
||||
close_num = #{record.closeNum},
|
||||
</if>
|
||||
<if test="record.periodEndNum != null">
|
||||
period_end_num = #{record.periodEndNum},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
INSERT INTO store_business_report_${enterpriseId} (join_brand,domestic,date,open_total_num,period_begin_num,new_open_num,close_num,period_end_num) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.joinBrand},#{item.domestic},#{item.date},#{item.openTotalNum},#{item.periodBeginNum},#{item.newOpenNum},#{item.closeNum},#{item.periodEndNum})
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
domestic = VALUES(domestic),
|
||||
open_total_num = VALUES(open_total_num),
|
||||
period_begin_num = VALUES(period_begin_num),
|
||||
new_open_num = VALUES(new_open_num),
|
||||
close_num = VALUES(close_num),
|
||||
period_end_num = VALUES(period_end_num)
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user