Commit 627f2e87 by zhiwj

status修改成deleteFlag

parent 32e7a5a4
......@@ -5,6 +5,16 @@ package com.gic.store.constant;
* @date 2019/7/4
*/
public interface Constants {
/**
* 正常
*/
Integer NORMAL = 0;
/**
* 关闭
*/
Integer DELETE = 1;
String STORE_BATCH_IMPORT_MQ_KEY = "storeBulkImport";
String CLERK_BATCH_IMPORT_MQ_KEY = "clerkBulkImport";
Integer STORE_BATCH_IMPORT_TASK_TYPE = 6;
......
......@@ -60,11 +60,6 @@ public class ClerkLogDTO implements Serializable {
/**
*
*/
private Integer status;
/**
*
*/
private Integer operatorId;
/**
......@@ -146,14 +141,6 @@ public class ClerkLogDTO implements Serializable {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getOperatorId() {
return operatorId;
}
......@@ -198,7 +185,6 @@ public class ClerkLogDTO implements Serializable {
", remark='" + remark + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
", status=" + status +
", operatorId=" + operatorId +
", operatorName='" + operatorName + '\'' +
", startTime='" + startTime + '\'' +
......
......@@ -46,10 +46,6 @@ public class ClerkPositionDTO implements Serializable {
*/
private Date updateTime;
/**
*
*/
private Integer status;
private Integer seq;
private Integer relNum;
......@@ -110,14 +106,6 @@ public class ClerkPositionDTO implements Serializable {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public void setSeq(Integer seq) {
this.seq = seq;
}
......@@ -144,7 +132,6 @@ public class ClerkPositionDTO implements Serializable {
", sort=" + sort +
", createTime=" + createTime +
", updateTime=" + updateTime +
", status=" + status +
", seq=" + seq +
", relNum=" + relNum +
'}';
......
......@@ -44,11 +44,6 @@ public class StoreBrandDTO implements Serializable {
/**
*
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
......@@ -108,14 +103,6 @@ public class StoreBrandDTO implements Serializable {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
......@@ -166,7 +153,6 @@ public class StoreBrandDTO implements Serializable {
", storeBrandCategory='" + storeBrandCategory + '\'' +
", sort=" + sort +
", enterpriseId=" + enterpriseId +
", status=" + status +
", createTime=" + createTime +
", updateTime=" + updateTime +
", seq=" + seq +
......
......@@ -60,7 +60,7 @@ public class StoreFieldDTO implements Serializable {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -145,12 +145,12 @@ public class StoreFieldDTO implements Serializable {
this.storeRegionId = storeRegionId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......@@ -218,7 +218,7 @@ public class StoreFieldDTO implements Serializable {
", storeFieldType=" + storeFieldType +
", enterpriseId=" + enterpriseId +
", storeRegionId='" + storeRegionId + '\'' +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
", storeFieldDetail='" + storeFieldDetail + '\'' +
......
......@@ -35,7 +35,7 @@ public class StoreFieldRelDTO implements Serializable{
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -79,12 +79,12 @@ public class StoreFieldRelDTO implements Serializable{
this.ownType = ownType;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......@@ -110,7 +110,7 @@ public class StoreFieldRelDTO implements Serializable{
", enterpriseId=" + enterpriseId +
", storeFieldId=" + storeFieldId +
", ownType=" + ownType +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
......
......@@ -28,7 +28,7 @@ public class StoreRegionDTO implements Serializable {
/**
* 状态值;1有效 0无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -74,12 +74,12 @@ public class StoreRegionDTO implements Serializable {
this.regionName = regionName;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......@@ -136,7 +136,7 @@ public class StoreRegionDTO implements Serializable {
"regionId=" + regionId +
", regionCode='" + regionCode + '\'' +
", regionName='" + regionName + '\'' +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
", enterpriseId=" + enterpriseId +
......
package com.gic.store.dto;
import java.io.Serializable;
import java.util.Date;
import com.gic.store.constant.StoreGroupConstant;
import com.gic.store.service.StoreStrategyApiService;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.gic.store.constant.StoreGroupConstant;
import com.gic.store.service.StoreStrategyApiService;
import java.io.Serializable;
import java.util.Date;
/**
* 门店分组策略和门店启用策略
......@@ -76,7 +75,7 @@ public class StoreStrategyDTO implements Serializable {
/**
* 状态值 1有效 0无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 策略类型,1门店状态策略, 2门店分组策略
......@@ -167,12 +166,12 @@ public class StoreStrategyDTO implements Serializable {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getStrategyType() {
......@@ -218,7 +217,7 @@ public class StoreStrategyDTO implements Serializable {
", targetValue='" + targetValue + '\'' +
", createTime=" + createTime +
", updateTime=" + updateTime +
", status=" + status +
", status=" + deleteFlag +
", strategyType=" + strategyType +
", sort=" + sort +
", storeCreateType='" + storeCreateType + '\'' +
......
......@@ -36,7 +36,7 @@ public class StoreTagDTO implements Serializable{
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,12 @@ public class StoreTagDTO implements Serializable{
this.storeTagName = storeTagName;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......@@ -111,7 +111,7 @@ public class StoreTagDTO implements Serializable{
", storeWidgetId=" + storeWidgetId +
", enterpriseId=" + enterpriseId +
", storeTagName='" + storeTagName + '\'' +
", status=" + status +
", status=" + deleteFlag +
", createTime=" + createTime +
", updateTime=" + updateTime +
'}';
......
......@@ -47,7 +47,7 @@ public class StoreTransferDTO implements Serializable {
/**
*
*/
private Integer status;
private Integer deleteFlag;
public Integer getStoreTransferId() {
return storeTransferId;
......@@ -97,12 +97,12 @@ public class StoreTransferDTO implements Serializable {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getFromStoreInfoId() {
......@@ -132,7 +132,7 @@ public class StoreTransferDTO implements Serializable {
", enterpriseId=" + enterpriseId +
", createTime=" + createTime +
", updateTime=" + updateTime +
", status=" + status +
", status=" + deleteFlag +
'}';
}
}
......@@ -11,14 +11,6 @@ import org.apache.ibatis.annotations.Param;
*/
public interface DictMapper {
/**
* 根据主键删除
*
* @param dictId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(String dictId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,14 +14,6 @@ import java.util.List;
*/
public interface TabAuthStoreLogMapper {
/**
* 根据主键删除
*
* @param id 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer id);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,14 +14,6 @@ import java.util.List;
*/
public interface TabCityMapper {
/**
* 根据主键删除
*
* @param cityId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(String cityId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -13,14 +13,6 @@ import com.github.pagehelper.Page;
*/
public interface TabClerkLogMapper {
/**
* 根据主键删除
*
* @param clerkLogId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer clerkLogId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -15,14 +15,6 @@ import java.util.List;
*/
public interface TabClerkPositionMapper {
/**
* 根据主键删除
*
* @param clerkPositionId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer clerkPositionId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,14 +14,6 @@ import java.util.List;
*/
public interface TabClerkTmpMapper {
/**
* 根据主键删除
*
* @param clerkTmpId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer clerkTmpId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,14 +14,6 @@ import java.util.List;
*/
public interface TabCountyMapper {
/**
* 根据主键删除
*
* @param countyId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(String countyId);
/**
* 插入一条记录
*
* @param record 实体对象
......
package com.gic.store.dao.mapper;
import com.gic.store.entity.TabEnterpriseLicense;
/**
*
* @ClassName: TabEnterpriseLicenseMapper
* @Description:
* @author zhiwj
* @date 2020-09-09 18:35
*/
public interface TabEnterpriseLicenseMapper {
/**
* 根据主键删除
*
* @param enterpriseLicenseId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer enterpriseLicenseId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabEnterpriseLicense record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabEnterpriseLicense record);
/**
* 根据主键查询
*
* @param enterpriseLicenseId 主键
* @return 实体对象
*/
TabEnterpriseLicense selectByPrimaryKey(Integer enterpriseLicenseId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabEnterpriseLicense record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabEnterpriseLicense record);
}
\ No newline at end of file
package com.gic.store.dao.mapper;
import com.gic.store.entity.TabEnterprise;
/**
*
* @ClassName: TabEnterpriseMapper
* @Description:
* @author zhiwj
* @date 2020-09-09 18:35
*/
public interface TabEnterpriseMapper {
/**
* 根据主键删除
*
* @param enterpriseId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer enterpriseId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabEnterprise record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabEnterprise record);
/**
* 根据主键查询
*
* @param enterpriseId 主键
* @return 实体对象
*/
TabEnterprise selectByPrimaryKey(Integer enterpriseId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabEnterprise record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabEnterprise record);
}
\ No newline at end of file
package com.gic.store.dao.mapper;
import com.gic.store.entity.TabEnterpriseVersion;
/**
*
* @ClassName: TabEnterpriseVersionMapper
* @Description:
* @author zhiwj
* @date 2020-09-09 18:35
*/
public interface TabEnterpriseVersionMapper {
/**
* 根据主键删除
*
* @param enterpriseServiceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer enterpriseServiceId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabEnterpriseVersion record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabEnterpriseVersion record);
/**
* 根据主键查询
*
* @param enterpriseServiceId 主键
* @return 实体对象
*/
TabEnterpriseVersion selectByPrimaryKey(Integer enterpriseServiceId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabEnterpriseVersion record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabEnterpriseVersion record);
}
\ No newline at end of file
......@@ -11,14 +11,6 @@ import com.gic.store.entity.TabIntegralStoreMove;
*/
public interface TabIntegralStoreMoveMapper {
/**
* 根据主键删除
*
* @param storeMoveId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeMoveId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,14 +14,6 @@ import java.util.List;
*/
public interface TabProvinceMapper {
/**
* 根据主键删除
*
* @param provinceId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(String provinceId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -15,14 +15,6 @@ import java.util.List;
*/
public interface TabStoreBusinessTimeMapper {
/**
* 根据主键删除
*
* @param storeBusinessTimeId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeBusinessTimeId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,14 +14,6 @@ import java.util.List;
*/
public interface TabStoreExtendMapper {
/**
* 根据主键删除
*
* @param storeExtendId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeExtendId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -15,14 +15,6 @@ import java.util.List;
*/
public interface TabStoreFieldMapper {
/**
* 根据主键删除
*
* @param storeFieldId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeFieldId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -16,14 +16,6 @@ import java.util.List;
*/
public interface TabStoreFieldRegionRelMapper {
/**
* 根据主键删除
*
* @param fieldRegionId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer fieldRegionId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -15,14 +15,6 @@ import java.util.List;
*/
public interface TabStoreFieldRelMapper {
/**
* 根据主键删除
*
* @param fieldRelationId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer fieldRelationId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -13,14 +13,6 @@ import java.util.List;
*/
public interface TabStoreFieldSelectMapper {
/**
* 根据主键删除
*
* @param storeFieldSelectId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeFieldSelectId);
/**
* deleteBatch
* @Title: deleteBatch
* @Description:
......
......@@ -15,14 +15,6 @@ import java.util.List;
*/
public interface TabStoreGroupMapper {
/**
* 根据主键删除
*
* @param storeGroupId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeGroupId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -11,14 +11,6 @@ import com.gic.store.entity.TabStoreGroupRel;
*/
public interface TabStoreGroupRelMapper {
/**
* 根据主键删除
*
* @param storeGroupRelId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeGroupRelId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -11,14 +11,6 @@ import com.gic.store.entity.TabStoreIndexLog;
*/
public interface TabStoreIndexLogMapper {
/**
* 根据主键删除
*
* @param storeIndexId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeIndexId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -16,14 +16,6 @@ import java.util.List;
*/
public interface TabStoreInfoMapper {
/**
* 根据主键删除
*
* @param storeId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -13,14 +13,6 @@ import com.github.pagehelper.Page;
*/
public interface TabStoreLogMapper {
/**
* 根据主键删除
*
* @param storeLogId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeLogId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,14 +14,6 @@ import java.util.List;
*/
public interface TabStoreMapper {
/**
* 根据主键删除
*
* @param storeId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -13,14 +13,6 @@ import java.util.List;
*/
public interface TabStorePhotoMapper {
/**
* 根据主键删除
*
* @param storePhotoId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storePhotoId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -114,9 +114,9 @@ public interface TabStoreRegionRelMapper {
* @author zhiwj
* @param enterpriseId
* @param regionId
* @param status
* @param deleteFlag
* @return void
* @throws
*/
void updateStatusByOther(@Param("enterpriseId") Integer enterpriseId, @Param("regionId") Integer regionId, @Param("status") int status);
void updateStatusByOther(@Param("enterpriseId") Integer enterpriseId, @Param("regionId") Integer regionId, @Param("deleteFlag") int deleteFlag);
}
\ No newline at end of file
......@@ -13,14 +13,6 @@ import java.util.List;
*/
public interface TabStoreStatusSettingMapper {
/**
* 根据主键删除
*
* @param storeStatusId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeStatusId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -13,14 +13,6 @@ import java.util.List;
*/
public interface TabStoreStrategyMapper {
/**
* 根据主键删除
*
* @param strategyId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer strategyId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,14 +14,6 @@ import java.util.List;
*/
public interface TabStoreTagMapper {
/**
* 根据主键删除
*
* @param storeTagId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeTagId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -13,14 +13,6 @@ import org.apache.ibatis.annotations.Param;
*/
public interface TabStoreTagTmpMapper {
/**
* 根据主键删除
*
* @param storeTagTmpId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeTagTmpId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -14,14 +14,6 @@ import java.util.List;
public interface TabStoreTmpMapper {
/**
* 根据主键删除
*
* @param storeTmpId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeTmpId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -11,14 +11,6 @@ import com.gic.store.entity.TabStoreTransfer;
*/
public interface TabStoreTransferMapper {
/**
* 根据主键删除
*
* @param storeTransferId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeTransferId);
/**
* 插入一条记录
*
* @param record 实体对象
......
......@@ -11,14 +11,6 @@ import com.gic.store.entity.TabStoreWidget;
*/
public interface TabStoreWidgetMapper {
/**
* 根据主键删除
*
* @param storeWidgetId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeWidgetId);
/**
* 插入一条记录
*
* @param record 实体对象
......
package com.gic.store.dao.mapper;
import com.gic.store.entity.TabUser;
/**
*
* @ClassName: TabUserMapper
* @Description:
* @author zhiwj
* @date 2020-09-09 18:53
*/
public interface TabUserMapper {
/**
* 根据主键删除
*
* @param userId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer userId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabUser record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabUser record);
/**
* 根据主键查询
*
* @param userId 主键
* @return 实体对象
*/
TabUser selectByPrimaryKey(Integer userId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabUser record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabUser record);
}
\ No newline at end of file
......@@ -61,7 +61,7 @@ public class TabClerkLog {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -145,12 +145,12 @@ public class TabClerkLog {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getOperatorId() {
......
......@@ -51,7 +51,7 @@ public class TabClerkPosition {
/**
*
*/
private Integer status;
private Integer deleteFlag;
public Integer getClerkPositionId() {
return clerkPositionId;
......@@ -109,11 +109,11 @@ public class TabClerkPosition {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
}
\ No newline at end of file
......@@ -36,7 +36,7 @@ public class TabIntegralStoreMove {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,12 @@ public class TabIntegralStoreMove {
this.endStoreId = endStoreId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -51,7 +51,7 @@ public class TabStoreBrand {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -124,12 +124,12 @@ public class TabStoreBrand {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -50,7 +50,7 @@ public class TabStoreBusinessTime {
private Integer enterpriseId;
private Integer status=1;
private Integer deleteFlag =0;
public Integer getStoreBusinessTimeId() {
return storeBusinessTimeId;
......@@ -116,11 +116,11 @@ public class TabStoreBusinessTime {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
}
\ No newline at end of file
......@@ -36,7 +36,7 @@ public class TabStoreField {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -95,12 +95,12 @@ public class TabStoreField {
this.storeFieldType = storeFieldType;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -31,7 +31,7 @@ public class TabStoreFieldRegionRel {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -67,12 +67,12 @@ public class TabStoreFieldRegionRel {
this.storeFieldId = storeFieldId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -36,7 +36,7 @@ public class TabStoreFieldRel {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,12 @@ public class TabStoreFieldRel {
this.ownType = ownType;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -51,7 +51,7 @@ public class TabStoreGroup {
/**
* 状态值
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -123,12 +123,12 @@ public class TabStoreGroup {
this.sort = sort;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -36,7 +36,7 @@ public class TabStoreGroupRel {
/**
* 1有效 0无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,12 @@ public class TabStoreGroupRel {
this.storeGroupId = storeGroupId;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -61,7 +61,7 @@ public class TabStoreLog {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -145,12 +145,12 @@ public class TabStoreLog {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getOperatorId() {
......
......@@ -46,7 +46,7 @@ public class TabStorePhoto {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -106,12 +106,12 @@ public class TabStorePhoto {
this.sort = sort;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -31,7 +31,7 @@ public class TabStoreRegion {
/**
* 状态值;1有效 0无效
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -67,12 +67,12 @@ public class TabStoreRegion {
this.regionName = regionName;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -41,7 +41,7 @@ public class TabStoreRegionRel {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -93,12 +93,12 @@ public class TabStoreRegionRel {
this.ownType = ownType;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -56,7 +56,7 @@ public class TabStoreStrategy {
/**
* 状态值 1有效 0无效
*/
private Integer status;
private Integer deleteFlag;
/**
* 策略类型,1门店状态策略, 2门店分组策略
......@@ -137,12 +137,12 @@ public class TabStoreStrategy {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getStrategyType() {
......
......@@ -36,7 +36,7 @@ public class TabStoreTag {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -80,12 +80,12 @@ public class TabStoreTag {
this.storeTagName = storeTagName;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Date getCreateTime() {
......
......@@ -56,7 +56,7 @@ public class TabStoreTransfer {
/**
*
*/
private Integer status;
private Integer deleteFlag;
public Integer getStoreTransferId() {
return storeTransferId;
......@@ -122,11 +122,11 @@ public class TabStoreTransfer {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
}
\ No newline at end of file
......@@ -43,7 +43,7 @@ public class TabStoreWidget {
/**
*
*/
private Integer status;
private Integer deleteFlag;
/**
*
......@@ -90,12 +90,12 @@ public class TabStoreWidget {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setStatus(Integer status) {
this.status = status;
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public String getWriteBackParam() {
......
......@@ -80,16 +80,6 @@ public interface StoreFieldSelectService {
void setStoreFieldSelectSort(int storeFieldSelectId, int storeFieldId, int setValue);
/**
* delete
* @Title: delete

* @Description:

 * @author guojuxing
* @param storeFieldSelectId

* @return int


 */
int delete(int storeFieldSelectId);
/**
* 批量个删除
* @Title: deleteBatch

* @Description:
......
package com.gic.store.service.impl;
import com.gic.commons.util.GlobalInfo;
import com.gic.store.constant.ClerkGenderEnum;
import com.gic.store.constant.ClerkLogTypeEnum;
import com.gic.store.constant.Constants;
import com.gic.store.dao.mapper.TabClerkLogMapper;
import com.gic.store.dto.ClerkDTO;
import com.gic.store.dto.ClerkLogDTO;
......@@ -44,7 +44,7 @@ public class ClerkLogServiceImpl implements ClerkLogService {
clerkLog.setLogType(ClerkLogTypeEnum.SAVE.getCode());
clerkLog.setRemark(remark);
clerkLog.setCreateTime(new Date());
clerkLog.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
clerkLog.setDeleteFlag(Constants.NORMAL);
clerkLog.setOperatorId(operatorId);
clerkLog.setOperatorName(operatorName);
return tabClerkLogMapper.insertSelective(clerkLog);
......@@ -64,7 +64,7 @@ public class ClerkLogServiceImpl implements ClerkLogService {
clerkLog.setLogType(ClerkLogTypeEnum.UPDATE.getCode());
clerkLog.setRemark(remark);
clerkLog.setCreateTime(new Date());
clerkLog.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
clerkLog.setDeleteFlag(Constants.NORMAL);
clerkLog.setOperatorId(operatorId);
clerkLog.setOperatorName(operatorName);
......
package com.gic.store.service.impl;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.GlobalInfo;
import com.gic.store.constant.Constants;
import com.gic.store.dao.mapper.TabClerkPositionMapper;
import com.gic.store.dto.ClerkPositionDTO;
......@@ -49,7 +48,7 @@ public class ClerkPositionServiceImpl implements ClerkPositionService {
public void save(ClerkPositionDTO clerkPositionDTO) {
TabClerkPosition clerkPosition = EntityUtil.changeEntityByJSON(TabClerkPosition.class, clerkPositionDTO);
clerkPosition.setCreateTime(new Date());
clerkPosition.setStatus(1);
clerkPosition.setDeleteFlag(Constants.NORMAL);
Double sort = tabClerkPositionMapper.getMinSort(clerkPositionDTO.getEnterpriseId());
clerkPosition.setSort(sort == null ? 1d : sort + 1d);
tabClerkPositionMapper.insertSelective(clerkPosition);
......@@ -64,7 +63,7 @@ public class ClerkPositionServiceImpl implements ClerkPositionService {
@Override
public TabClerkPosition getByClerkPositionId(Integer clerkPositionId) {
TabClerkPosition position = tabClerkPositionMapper.selectByPrimaryKey(clerkPositionId);
if (position != null && GlobalInfo.DATA_STATUS_NORMAL == position.getStatus()) {
if (position != null && Constants.NORMAL.equals(position.getDeleteFlag())) {
return position;
}
return null;
......@@ -85,7 +84,7 @@ public class ClerkPositionServiceImpl implements ClerkPositionService {
public void deleteById(Integer clerkPositionId) {
TabClerkPosition clerkPosition = new TabClerkPosition();
clerkPosition.setClerkPositionId(clerkPositionId);
clerkPosition.setStatus(0);
clerkPosition.setDeleteFlag(Constants.DELETE);
tabClerkPositionMapper.updateByPrimaryKeySelective(clerkPosition);
}
......
......@@ -35,7 +35,7 @@ public class StoreBrandServiceImpl implements StoreBrandService {
storeBrand.setStoreBrandCategoryCode(copy.getStoreBrandCategoryCode());
storeBrand.setStoreBrandCategory(copy.getStoreBrandCategory());
storeBrand.setEnterpriseId(copy.getEnterpriseId());
storeBrand.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
storeBrand.setDeleteFlag(0);
storeBrand.setCreateTime(new Date());
storeBrand.setHasRel(GlobalInfo.DATA_STATUS_DELETE);
......
......@@ -27,7 +27,7 @@ public class StoreFieldRelServiceImpl implements StoreFieldRelService{
public void saveStoreFieldRel(StoreFieldRelDTO dto) {
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setStatus(1);
dto.setDeleteFlag(0);
tabStoreFieldRelMapper.insert(EntityUtil.changeEntityNew(TabStoreFieldRel.class, dto));
}
......
......@@ -85,11 +85,6 @@ public class StoreFieldSelectServiceImpl implements StoreFieldSelectService{
}
@Override
public int delete(int storeFieldSelectId) {
return tabStoreFieldSelectMapper.deleteByPrimaryKey(storeFieldSelectId);
}
@Override
public int deleteBatch(List<Integer> storeFieldSelectIdList) {
return tabStoreFieldSelectMapper.deleteBatch(storeFieldSelectIdList);
}
......
......@@ -110,7 +110,7 @@ public class StoreFieldServiceImpl implements StoreFieldService{
public int delete(int storeFieldId) {
TabStoreField storeField = new TabStoreField();
storeField.setStoreFieldId(storeFieldId);
storeField.setStatus(0);
storeField.setDeleteFlag(1);
return tabStoreFieldMapper.updateByPrimaryKeySelective(storeField);
}
......
package com.gic.store.service.impl;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.GlobalInfo;
import com.gic.store.constant.StoreLogReasonEnum;
import com.gic.store.constant.StoreLogTypeEnum;
import com.gic.store.dao.mapper.TabStoreLogMapper;
......@@ -35,7 +34,7 @@ public class StoreLogServiceImpl implements StoreLogService {
public Integer saveStoreLog(StoreLogDTO storeLog) {
TabStoreLog tabStoreLog = EntityUtil.changeEntityByJSON(TabStoreLog.class, storeLog);
tabStoreLog.setCreateTime(new Date());
tabStoreLog.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
tabStoreLog.setDeleteFlag(0);
return tabStoreLogMapper.insertSelective(tabStoreLog);
}
......@@ -56,7 +55,7 @@ public class StoreLogServiceImpl implements StoreLogService {
storeLog.setOperatorName(operatorName);
storeLog.setContent(content);
storeLog.setCreateTime(new Date());
storeLog.setStatus(1);
storeLog.setDeleteFlag(0);
List<Integer> storeIdList = storeService.listStoredByStoreInfoList(storeInfoIdList, enterpriseId);
for (Integer storeId : storeIdList) {
storeLog.setStoreId(storeId);
......@@ -75,7 +74,7 @@ public class StoreLogServiceImpl implements StoreLogService {
storeLog.setOperatorName(operatorName);
storeLog.setContent(content);
storeLog.setCreateTime(new Date());
storeLog.setStatus(1);
storeLog.setDeleteFlag(0);
for (Integer storeId : storeInfoIdList) {
storeLog.setStoreId(storeId);
tabStoreLogMapper.insertSelective(storeLog);
......
package com.gic.store.service.impl;
import com.gic.commons.util.GlobalInfo;
import com.gic.store.dao.mapper.TabStorePhotoMapper;
import com.gic.store.dto.StorePhotoDTO;
import com.gic.store.entity.TabStorePhoto;
......@@ -43,7 +42,7 @@ public class StorePhotoServiceImpl implements StorePhotoService {
storePhoto.setImageCode(storePhotoDTO.getImageCode());
storePhoto.setImageUrl(storePhotoDTO.getImageUrl());
storePhoto.setSort(storePhotoDTO.getSort());
storePhoto.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
storePhoto.setDeleteFlag(0);
storePhoto.setStoreInfoId(storeInfoId);
storePhoto.setSort(i);
if (storePhotoDTO.getStorePhotoId() == null) {
......
package com.gic.store.service.impl;
import com.gic.commons.util.GlobalInfo;
import com.gic.store.constant.StoreOwnTypeEnum;
import com.gic.store.dao.mapper.TabStoreRegionRelMapper;
import com.gic.store.entity.TabStoreRegionRel;
......@@ -30,7 +29,7 @@ public class StoreRegionRelServiceImpl implements StoreRegionRelService {
storeRegionRel.setEnterpriseId(enterpriseId);
storeRegionRel.setFromEnterpriseId(enterpriseId);
storeRegionRel.setOwnType(StoreOwnTypeEnum.OWNER.getCode());
storeRegionRel.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
storeRegionRel.setDeleteFlag(0);
storeRegionRel.setCreateTime(new Date());
return tabStoreRegionRelMapper.insertSelective(storeRegionRel);
}
......@@ -42,7 +41,7 @@ public class StoreRegionRelServiceImpl implements StoreRegionRelService {
storeRegionRel.setFromEnterpriseId(fromEnterpriseId);
storeRegionRel.setEnterpriseId(enterpriseId);
storeRegionRel.setOwnType(StoreOwnTypeEnum.OTHER.getCode());
storeRegionRel.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
storeRegionRel.setDeleteFlag(0);
storeRegionRel.setCreateTime(new Date());
return tabStoreRegionRelMapper.insertSelective(storeRegionRel);
}
......
package com.gic.store.service.impl;
import com.gic.commons.util.GlobalInfo;
import com.gic.store.dao.mapper.TabStoreRegionMapper;
import com.gic.store.dto.StoreRegionDTO;
import com.gic.store.entity.TabStoreRegion;
......@@ -50,7 +49,7 @@ public class StoreRegionServiceImpl implements StoreRegionService {
storeRegion.setRegionCode(regionCode);
storeRegion.setRegionName(regionName);
storeRegion.setCreateTime(new Date());
storeRegion.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
storeRegion.setDeleteFlag(0);
storeRegionMapper.insertSelective(storeRegion);
return storeRegion.getRegionId();
}
......
......@@ -119,7 +119,7 @@ public class StoreStrategyServiceImpl implements StoreStrategyService{
public int deleteStoreGroupStrategy(int strategyId) {
TabStoreStrategy storeStrategy = new TabStoreStrategy();
storeStrategy.setStrategyId(strategyId);
storeStrategy.setStatus(0);
storeStrategy.setDeleteFlag(1);
return tabStoreStrategyMapper.updateByPrimaryKeySelective(storeStrategy);
}
......
......@@ -27,7 +27,7 @@ public class StoreTagServiceImpl implements StoreTagService{
public Integer save(StoreTagDTO dto) {
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setStatus(1);
dto.setDeleteFlag(0);
TabStoreTag record = EntityUtil.changeEntityNew(TabStoreTag.class, dto);
tabStoreTagMapper.insert(record);
return record.getStoreTagId();
......
......@@ -26,7 +26,7 @@ public class StoreTransferServiceImpl implements StoreTransferService {
TabStoreTransfer transfer = EntityUtil.changeEntityByJSON(TabStoreTransfer.class, storeTransferDTO);
transfer.setCreateTime(new Date());
transfer.setUpdateTime(new Date());
transfer.setStatus(1);
transfer.setDeleteFlag(0);
tabStoreTransferMapper.insertSelective(transfer);
}
}
......@@ -32,7 +32,7 @@ public class StoreWidgetServiceImpl implements StoreWidgetService {
tabStoreWidget.setWriteBackParam(storeWidgetDTO.getWriteBackParam());
tabStoreWidget.setCreateTime(new Date());
tabStoreWidget.setUpdateTime(new Date());
tabStoreWidget.setStatus(Constants.NORMAL_STATUS);
tabStoreWidget.setDeleteFlag(0);
this.tabStoreWidgetMapper.insert(tabStoreWidget);
return tabStoreWidget.getStoreWidgetId();
}
......
package com.gic.store.service.outer.impl;
import java.util.*;
import com.gic.auth.constant.SignConstants;
import com.gic.store.constant.Constants;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.SignConstants;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.error.ErrorCode;
import com.gic.store.constant.Constants;
import com.gic.store.constant.StoreOwnTypeEnum;
import com.gic.store.dto.StoreFieldDTO;
import com.gic.store.dto.StoreFieldRegionMapDTO;
......@@ -28,6 +17,16 @@ import com.gic.store.entity.TabStoreFieldRel;
import com.gic.store.service.*;
import com.gic.store.utils.StoreFieldValidParamUtil;
import com.gic.store.utils.valid.ValidUtil;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.util.*;
/**
* @author guojx
......@@ -90,7 +89,7 @@ public class StoreFieldApiServiceImpl implements StoreFieldApiService {
}
storeFieldDTO.setCreateTime(new Date());
storeFieldDTO.setUpdateTime(new Date());
storeFieldDTO.setStatus(1);
storeFieldDTO.setDeleteFlag(0);
storeFieldDTO.setSort(storeFieldService.getMinSort(storeFieldDTO.getEnterpriseId()) - 1);
int storeFieldId = storeFieldService.save(storeFieldDTO);
......@@ -400,7 +399,7 @@ public class StoreFieldApiServiceImpl implements StoreFieldApiService {
dto.setStoreFieldId(ownStoreField);
dto.setEnterpriseId(toEnterpriseId);
dto.setOwnType(StoreOwnTypeEnum.OTHER.getCode());
dto.setStatus(1);
dto.setDeleteFlag(0);
storeFieldRelList.add(dto);
}
storeFieldRelService.saveFetch(storeFieldRelList);
......
package com.gic.store.service.outer.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Stack;
import java.util.concurrent.TimeUnit;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.PageHelperUtils;
import com.gic.store.service.StoreApiService;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.error.ErrorCode;
import com.gic.redis.data.util.RedisUtil;
import com.gic.store.constant.StoreGroupConstant;
import com.gic.store.dto.StoreGroupDTO;
import com.gic.store.entity.TabStoreGroup;
import com.gic.store.service.StoreApiService;
import com.gic.store.service.StoreGroupApiService;
import com.gic.store.service.StoreGroupService;
import com.gic.store.service.StoreService;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Stack;
import java.util.concurrent.TimeUnit;
/**
* @author guojx
......@@ -62,7 +61,7 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
}
storeGroupDTO.setCreateTime(new Date());
storeGroupDTO.setUpdateTime(new Date());
storeGroupDTO.setStatus(1);
storeGroupDTO.setStatus(0);
if (storeGroupDTO.getIsDefault() == null) {
storeGroupDTO.setIsDefault(0);
}
......@@ -292,7 +291,7 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
}
TabStoreGroup tabStoreGroup = new TabStoreGroup();
tabStoreGroup.setStoreGroupId(storeGroupId);
tabStoreGroup.setStatus(0);
tabStoreGroup.setDeleteFlag(1);
storeGroupService.update(tabStoreGroup);
refreshRedisCache(storeGroupId);
......
......@@ -155,9 +155,9 @@ public class StoreRegionApiServiceImpl implements StoreRegionApiService {
if (storeRegionRel == null) {
// 插入
storeRegionRelService.saveByOther(fromEnterpriseId, toEnterpriseId, regionId);
} else if (storeRegionRel.getStatus() == 0) {
} else if (storeRegionRel.getDeleteFlag() == 1) {
// 状态更新为1
storeRegionRelService.updateStatusByOther(toEnterpriseId, regionId, GlobalInfo.DATA_STATUS_NORMAL);
storeRegionRelService.updateStatusByOther(toEnterpriseId, regionId, 1);
}
}
// 调用门店自定义属性方法
......
......@@ -73,7 +73,7 @@ public class StoreStrategyApiServiceImpl implements StoreStrategyApiService{
storeStrategyDTO.setCreateTime(new Date());
storeStrategyDTO.setUpdateTime(new Date());
storeStrategyDTO.setStatus(1);
storeStrategyDTO.setDeleteFlag(0);
//sort
storeStrategyDTO.setSort(storeStrategyService.getMinSort(storeStrategyDTO.getEnterpriseId(), storeStrategyDTO.getStrategyType()) - 1d);
......
......@@ -56,7 +56,7 @@ public class StoreTagApiServiceImpl implements StoreTagApiService{
//set value
dto.setEnterpriseId(record.getEnterpriseId());
dto.setCreateTime(record.getCreateTime());
dto.setStatus(record.getStatus());
dto.setDeleteFlag(record.getDeleteFlag());
storeTagService.update(dto);
return ServiceResponse.success();
......@@ -72,7 +72,7 @@ public class StoreTagApiServiceImpl implements StoreTagApiService{
StoreTagDTO dto = new StoreTagDTO();
dto.setStoreTagId(storeTagId);
dto.setStatus(0);
dto.setDeleteFlag(1);
storeTagService.update(dto);
return ServiceResponse.success(record.getStoreTagName());
......
......@@ -20,10 +20,6 @@
from tab_gic_dict
where DICT_ID = #{dictId,jdbcType=CHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_gic_dict
where DICT_ID = #{dictId,jdbcType=CHAR}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabGicDict">
insert into tab_gic_dict (DICT_ID, DICT_TYPE, DICT_CODE,
DICT_VALUE, DICT_NAME, DICT_STATUS,
......
......@@ -18,10 +18,6 @@
from tab_auth_store_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_auth_store_log
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabAuthStoreLog">
<selectKey keyProperty="storeInfoId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
......
......@@ -18,10 +18,6 @@
from tab_city
where city_id = #{cityId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_city
where city_id = #{cityId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabCity">
insert into tab_city (city_id, city_name, province_id,
city_py, create_time, update_time
......
......@@ -11,13 +11,13 @@
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="operator_id" jdbcType="INTEGER" property="operatorId" />
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
</resultMap>
<sql id="Base_Column_List">
clerk_log_id, enterprise_id, clerk_id, content, reason, log_type, remark, create_time,
update_time, status, operator_id, operator_name
update_time, delete_flag, operator_id, operator_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -25,20 +25,16 @@
from tab_clerk_log
where clerk_log_id = #{clerkLogId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_clerk_log
where clerk_log_id = #{clerkLogId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabClerkLog">
insert into tab_clerk_log (clerk_log_id, enterprise_id, clerk_id,
content, reason, log_type,
remark, create_time, update_time,
status, operator_id, operator_name
delete_flag, operator_id, operator_name
)
values (#{clerkLogId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{clerkId,jdbcType=INTEGER},
#{content,jdbcType=VARCHAR}, #{reason,jdbcType=INTEGER}, #{logType,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{operatorId,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}
#{deleteFlag,jdbcType=INTEGER}, #{operatorId,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.store.entity.TabClerkLog">
......@@ -71,8 +67,8 @@
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="operatorId != null">
operator_id,
......@@ -109,8 +105,8 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="operatorId != null">
#{operatorId,jdbcType=INTEGER},
......@@ -147,8 +143,8 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=INTEGER},
......@@ -169,7 +165,7 @@
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
operator_id = #{operatorId,jdbcType=INTEGER},
operator_name = #{operatorName,jdbcType=VARCHAR}
where clerk_log_id = #{clerkLogId,jdbcType=INTEGER}
......@@ -178,7 +174,7 @@
select
<include refid="Base_Column_List" />
from tab_clerk_log
where status = 1
where delete_flag = 0
<if test="clerkId != null ">
and clerk_id = #{clerkId}
</if>
......
......@@ -9,11 +9,11 @@
<result column="sort" jdbcType="DOUBLE" property="sort" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap>
<sql id="Base_Column_List">
clerk_position_id, enterprise_id, position_name, position_code, sort, create_time,
update_time, status
update_time, delete_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -21,17 +21,13 @@
from tab_clerk_position
where clerk_position_id = #{clerkPositionId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_clerk_position
where clerk_position_id = #{clerkPositionId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabClerkPosition">
insert into tab_clerk_position (clerk_position_id, enterprise_id, position_name,
position_code, sort, create_time,
update_time, status)
update_time, delete_flag)
values (#{clerkPositionId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{positionName,jdbcType=VARCHAR},
#{positionCode,jdbcType=VARCHAR}, #{sort,jdbcType=DOUBLE}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER})
#{updateTime,jdbcType=TIMESTAMP}, #{deleteFlag,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.store.entity.TabClerkPosition">
insert into tab_clerk_position
......@@ -57,8 +53,8 @@
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -83,8 +79,8 @@
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
......@@ -109,8 +105,8 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
</set>
where clerk_position_id = #{clerkPositionId,jdbcType=INTEGER}
......@@ -123,13 +119,13 @@
sort = #{sort,jdbcType=DOUBLE},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
delete_flag = #{deleteFlag,jdbcType=INTEGER}
where clerk_position_id = #{clerkPositionId,jdbcType=INTEGER}
</update>
<select id="getSelective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_clerk_position where status = 1
from tab_clerk_position where delete_flag = 0
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
......@@ -146,7 +142,7 @@
<select id="listClerkPosition" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_clerk_position where status = 1
from tab_clerk_position where delete_flag = 0
and ( enterprise_id = #{enterpriseId} or enterprise_id is null )
<if test="search != null and search != '' ">
and ( position_name like concat('%', #{search}, '%') or position_code like concat('%', #{search}, '%') )
......@@ -154,16 +150,16 @@
order by sort
</select>
<select id="getMinSort" resultType="double">
select sort from tab_clerk_position where status = 1 and enterprise_id = #{enterpriseId} order by sort limit 1
select sort from tab_clerk_position where delete_flag = 0 and enterprise_id = #{enterpriseId} order by sort limit 1
</select>
<select id="getMaxSort" resultType="double">
select sort from tab_clerk_position where status = 1 and enterprise_id = #{enterpriseId} order by sort desc limit 1
select sort from tab_clerk_position where delete_flag = 0 and enterprise_id = #{enterpriseId} order by sort desc limit 1
</select>
<select id="listTwoElementExceptId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_clerk_position
where status = 1
where delete_flag = 0
and enterprise_id = #{enterpriseId}
and clerk_position_id &lt;&gt; #{clerkPositionId}
order by sort
......
......@@ -31,10 +31,6 @@
from tab_clerk_tmp
where clerk_tmp_id = #{clerkTmpId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_clerk_tmp
where clerk_tmp_id = #{clerkTmpId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabClerkTmp">
insert into tab_clerk_tmp (clerk_tmp_id, enterprise_id, region_name,
clerk_name, clerk_code, store_name,
......
......@@ -21,10 +21,6 @@
from tab_county
where county_id = #{countyId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_county
where county_id = #{countyId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabCounty">
insert into tab_county (county_id, county_name, city_id,
province_id, full_name, create_time,
......
<?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.gic.store.dao.mapper.TabEnterpriseLicenseMapper">
<resultMap id="BaseResultMap" type="com.gic.store.entity.TabEnterpriseLicense">
<id column="enterprise_license_id" jdbcType="INTEGER" property="enterpriseLicenseId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="license_type" jdbcType="INTEGER" property="licenseType" />
<result column="lower_limit" jdbcType="INTEGER" property="lowerLimit" />
<result column="upper_limit" jdbcType="INTEGER" property="upperLimit" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
enterprise_license_id, enterprise_id, license_type, lower_limit, upper_limit, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise_license
where enterprise_license_id = #{enterpriseLicenseId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_enterprise_license
where enterprise_license_id = #{enterpriseLicenseId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabEnterpriseLicense">
insert into tab_enterprise_license (enterprise_license_id, enterprise_id,
license_type, lower_limit, upper_limit,
create_time, update_time)
values (#{enterpriseLicenseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{licenseType,jdbcType=INTEGER}, #{lowerLimit,jdbcType=INTEGER}, #{upperLimit,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.store.entity.TabEnterpriseLicense">
insert into tab_enterprise_license
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseLicenseId != null">
enterprise_license_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="licenseType != null">
license_type,
</if>
<if test="lowerLimit != null">
lower_limit,
</if>
<if test="upperLimit != null">
upper_limit,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseLicenseId != null">
#{enterpriseLicenseId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="licenseType != null">
#{licenseType,jdbcType=INTEGER},
</if>
<if test="lowerLimit != null">
#{lowerLimit,jdbcType=INTEGER},
</if>
<if test="upperLimit != null">
#{upperLimit,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.store.entity.TabEnterpriseLicense">
update tab_enterprise_license
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="licenseType != null">
license_type = #{licenseType,jdbcType=INTEGER},
</if>
<if test="lowerLimit != null">
lower_limit = #{lowerLimit,jdbcType=INTEGER},
</if>
<if test="upperLimit != null">
upper_limit = #{upperLimit,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where enterprise_license_id = #{enterpriseLicenseId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.store.entity.TabEnterpriseLicense">
update tab_enterprise_license
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
license_type = #{licenseType,jdbcType=INTEGER},
lower_limit = #{lowerLimit,jdbcType=INTEGER},
upper_limit = #{upperLimit,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where enterprise_license_id = #{enterpriseLicenseId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?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.gic.store.dao.mapper.TabEnterpriseMapper">
<resultMap id="BaseResultMap" type="com.gic.store.entity.TabEnterprise">
<id column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="enterprise_name" jdbcType="VARCHAR" property="enterpriseName" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="area_id" jdbcType="VARCHAR" property="areaId" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
enterprise_id, enterprise_name, company_name, logo, area_id, address, status, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_enterprise
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabEnterprise">
insert into tab_enterprise (enterprise_id, enterprise_name, company_name,
logo, area_id, address,
status, create_time, update_time
)
values (#{enterpriseId,jdbcType=INTEGER}, #{enterpriseName,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR},
#{logo,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.store.entity.TabEnterprise">
insert into tab_enterprise
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="enterpriseName != null">
enterprise_name,
</if>
<if test="companyName != null">
company_name,
</if>
<if test="logo != null">
logo,
</if>
<if test="areaId != null">
area_id,
</if>
<if test="address != null">
address,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseName != null">
#{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
#{companyName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="areaId != null">
#{areaId,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.store.entity.TabEnterprise">
update tab_enterprise
<set>
<if test="enterpriseName != null">
enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="areaId != null">
area_id = #{areaId,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.store.entity.TabEnterprise">
update tab_enterprise
set enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
area_id = #{areaId,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?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.gic.store.dao.mapper.TabEnterpriseVersionMapper">
<resultMap id="BaseResultMap" type="com.gic.store.entity.TabEnterpriseVersion">
<id column="enterprise_service_id" jdbcType="INTEGER" property="enterpriseServiceId" />
<result column="service_code" jdbcType="VARCHAR" property="serviceCode" />
<result column="service_name" jdbcType="VARCHAR" property="serviceName" />
<result column="service_version" jdbcType="INTEGER" property="serviceVersion" />
<result column="service_cycle" jdbcType="INTEGER" property="serviceCycle" />
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
<result column="expiration_time" jdbcType="TIMESTAMP" property="expirationTime" />
<result column="enterprise_id" jdbcType="BIGINT" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
enterprise_service_id, service_code, service_name, service_version, service_cycle,
audit_time, expiration_time, enterprise_id, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise_version
where enterprise_service_id = #{enterpriseServiceId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_enterprise_version
where enterprise_service_id = #{enterpriseServiceId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabEnterpriseVersion">
insert into tab_enterprise_version (enterprise_service_id, service_code,
service_name, service_version, service_cycle,
audit_time, expiration_time, enterprise_id,
status, create_time, update_time
)
values (#{enterpriseServiceId,jdbcType=INTEGER}, #{serviceCode,jdbcType=VARCHAR},
#{serviceName,jdbcType=VARCHAR}, #{serviceVersion,jdbcType=INTEGER}, #{serviceCycle,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP}, #{expirationTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=BIGINT},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.store.entity.TabEnterpriseVersion">
insert into tab_enterprise_version
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseServiceId != null">
enterprise_service_id,
</if>
<if test="serviceCode != null">
service_code,
</if>
<if test="serviceName != null">
service_name,
</if>
<if test="serviceVersion != null">
service_version,
</if>
<if test="serviceCycle != null">
service_cycle,
</if>
<if test="auditTime != null">
audit_time,
</if>
<if test="expirationTime != null">
expiration_time,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseServiceId != null">
#{enterpriseServiceId,jdbcType=INTEGER},
</if>
<if test="serviceCode != null">
#{serviceCode,jdbcType=VARCHAR},
</if>
<if test="serviceName != null">
#{serviceName,jdbcType=VARCHAR},
</if>
<if test="serviceVersion != null">
#{serviceVersion,jdbcType=INTEGER},
</if>
<if test="serviceCycle != null">
#{serviceCycle,jdbcType=INTEGER},
</if>
<if test="auditTime != null">
#{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="expirationTime != null">
#{expirationTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.store.entity.TabEnterpriseVersion">
update tab_enterprise_version
<set>
<if test="serviceCode != null">
service_code = #{serviceCode,jdbcType=VARCHAR},
</if>
<if test="serviceName != null">
service_name = #{serviceName,jdbcType=VARCHAR},
</if>
<if test="serviceVersion != null">
service_version = #{serviceVersion,jdbcType=INTEGER},
</if>
<if test="serviceCycle != null">
service_cycle = #{serviceCycle,jdbcType=INTEGER},
</if>
<if test="auditTime != null">
audit_time = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="expirationTime != null">
expiration_time = #{expirationTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=BIGINT},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where enterprise_service_id = #{enterpriseServiceId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.store.entity.TabEnterpriseVersion">
update tab_enterprise_version
set service_code = #{serviceCode,jdbcType=VARCHAR},
service_name = #{serviceName,jdbcType=VARCHAR},
service_version = #{serviceVersion,jdbcType=INTEGER},
service_cycle = #{serviceCycle,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=TIMESTAMP},
expiration_time = #{expirationTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=BIGINT},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where enterprise_service_id = #{enterpriseServiceId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
......@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="begin_store_id" jdbcType="INTEGER" property="beginStoreId" />
<result column="end_store_id" jdbcType="INTEGER" property="endStoreId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
store_move_id, enterprise_id, begin_store_id, end_store_id, status, create_time,
store_move_id, enterprise_id, begin_store_id, end_store_id, delete_flag, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -20,16 +20,12 @@
from tab_integral_store_move
where store_move_id = #{storeMoveId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_integral_store_move
where store_move_id = #{storeMoveId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabIntegralStoreMove">
insert into tab_integral_store_move (store_move_id, enterprise_id, begin_store_id,
end_store_id, status, create_time,
end_store_id, delete_flag, create_time,
update_time)
values (#{storeMoveId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{beginStoreId,jdbcType=INTEGER},
#{endStoreId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{endStoreId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.store.entity.TabIntegralStoreMove">
......@@ -47,8 +43,8 @@
<if test="endStoreId != null">
end_store_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -70,8 +66,8 @@
<if test="endStoreId != null">
#{endStoreId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -93,8 +89,8 @@
<if test="endStoreId != null">
end_store_id = #{endStoreId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -110,7 +106,7 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
begin_store_id = #{beginStoreId,jdbcType=INTEGER},
end_store_id = #{endStoreId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where store_move_id = #{storeMoveId,jdbcType=INTEGER}
......
......@@ -17,10 +17,6 @@
from tab_province
where province_id = #{provinceId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_province
where province_id = #{provinceId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabProvince">
insert into tab_province (province_id, province_name, province_py,
create_time, update_time)
......
......@@ -9,14 +9,14 @@
<result column="store_brand_category" jdbcType="VARCHAR" property="storeBrandCategory" />
<result column="sort" jdbcType="DOUBLE" property="sort" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="has_rel" jdbcType="INTEGER" property="hasRel" />
</resultMap>
<sql id="Base_Column_List">
store_brand_id, store_brand_code, store_brand_name, store_brand_category_code, store_brand_category,
sort, enterprise_id, status, create_time, update_time, has_rel
sort, enterprise_id, delete_flag, create_time, update_time, has_rel
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -31,12 +31,12 @@
<insert id="insert" parameterType="com.gic.store.entity.TabStoreBrand">
insert into tab_store_brand (store_brand_id, store_brand_code, store_brand_name,
store_brand_category_code, store_brand_category,
sort, enterprise_id, status,
sort, enterprise_id, delete_flag,
create_time, update_time, has_rel
)
values (#{storeBrandId,jdbcType=INTEGER}, #{storeBrandCode,jdbcType=VARCHAR}, #{storeBrandName,jdbcType=VARCHAR},
#{storeBrandCategoryCode,jdbcType=VARCHAR}, #{storeBrandCategory,jdbcType=VARCHAR},
#{sort,jdbcType=DOUBLE}, #{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{sort,jdbcType=DOUBLE}, #{enterpriseId,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{hasRel,jdbcType=INTEGER}
)
</insert>
......@@ -67,8 +67,8 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -102,8 +102,8 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -137,8 +137,8 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -160,7 +160,7 @@
store_brand_category = #{storeBrandCategory,jdbcType=VARCHAR},
sort = #{sort,jdbcType=DOUBLE},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
has_rel = #{hasRel,jdbcType=INTEGER}
......@@ -168,14 +168,14 @@
</update>
<select id="getMinSort" resultType="java.lang.Double">
select sort from tab_store_brand where status = 1 and enterprise_id = #{enterpriseId} order by sort limit 0, 1
select sort from tab_store_brand where delete_flag = 0 and enterprise_id = #{enterpriseId} order by sort limit 0, 1
</select>
<select id="getMaxSort" resultType="java.lang.Double">
select sort from tab_store_brand where status = 1 and enterprise_id = #{enterpriseId} order by sort desc limit 0, 1
select sort from tab_store_brand where delete_flag = 0 and enterprise_id = #{enterpriseId} order by sort desc limit 0, 1
</select>
<select id="countBySelective" resultType="java.lang.Integer">
select count(1) from tab_store_brand
where status = 1
where delete_flag = 0
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
......@@ -193,7 +193,7 @@
select
<include refid="Base_Column_List" />
from tab_store_brand
where status = 1
where delete_flag = 0
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
......@@ -206,7 +206,7 @@
select
<include refid="Base_Column_List" />
from tab_store_brand
where status = 1
where delete_flag = 0
and enterprise_id = #{enterpriseId}
and sort &lt; #{sort}
order by sort desc
......@@ -216,7 +216,7 @@
select
<include refid="Base_Column_List" />
from tab_store_brand
where status = 1
where delete_flag = 0
and enterprise_id = #{enterpriseId}
and sort &gt; #{sort}
order by sort
......@@ -226,14 +226,14 @@
select
<include refid="Base_Column_List" />
from tab_store_brand
where status = 1
where delete_flag = 0
and enterprise_id = #{enterpriseId}
and store_brand_id &lt;&gt; #{storeBrandId}
order by sort
limit #{start}, #{size}
</select>
<update id="deleteByIds">
update tab_store_brand set status = 0
update tab_store_brand set delete_flag = 1
<where>
<if test="null != ids and ids.size() &gt; 0">
and store_brand_id in
......@@ -247,7 +247,7 @@
select
<include refid="Base_Column_List" />
from tab_store_brand
where status = 1
where delete_flag = 0
<if test="null != ids and ids.size() &gt; 0">
and store_brand_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
......@@ -260,7 +260,7 @@
select
<include refid="Base_Column_List" />
from tab_store_brand
where status = 1
where delete_flag = 0
and enterprise_id = #{enterpriseId}
<if test="storeBrandName != null ">
and store_brand_name = #{storeBrandName}
......
......@@ -10,10 +10,10 @@
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
</resultMap>
<sql id="Base_Column_List">
store_business_time_id, weekday, open_time, close_time, store_info_id, create_time, update_time,enterprise_id, status
store_business_time_id, weekday, open_time, close_time, store_info_id, create_time, update_time,enterprise_id, delete_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -21,17 +21,13 @@
from tab_store_business_time
where store_business_time_id = #{storeBusinessTimeId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_store_business_time
where store_business_time_id = #{storeBusinessTimeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabStoreBusinessTime">
insert into tab_store_business_time (store_business_time_id, weekday, open_time,
close_time, store_info_id, create_time,
update_time,enterprise_id, status)
update_time,enterprise_id, delete_flag)
values (#{storeBusinessTimeId,jdbcType=INTEGER}, #{weekday,jdbcType=VARCHAR}, #{openTime,jdbcType=TIME},
#{closeTime,jdbcType=TIME}, #{storeInfoId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},#{enterpriseId,jdbcType=INTEGER}, #{status, jdbcType=INTEGER})
#{updateTime,jdbcType=TIMESTAMP},#{enterpriseId,jdbcType=INTEGER}, #{deleteFlag, jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.store.entity.TabStoreBusinessTime">
insert into tab_store_business_time
......@@ -60,8 +56,8 @@
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -89,8 +85,8 @@
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
......@@ -118,8 +114,8 @@
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
</set>
where store_business_time_id = #{storeBusinessTimeId,jdbcType=INTEGER}
......@@ -133,14 +129,14 @@
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}
delete_flag = #{deleteFlag,jdbcType=INTEGER}
where store_business_time_id = #{storeBusinessTimeId,jdbcType=INTEGER}
</update>
<select id="listBusinessTime" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_store_business_time
where store_info_id = #{storeInfoId} and status = 1
where store_info_id = #{storeInfoId} and delete_flag = 0
</select>
<insert id="updateAllBuinessTime">
insert into tab_store_business_time(
......@@ -151,9 +147,9 @@
<insert id="updateBuinessTimeBystoreInfoIds">
insert into tab_store_business_time(
weekday,open_time,close_time,store_info_id,create_time,update_time,enterprise_id, status
weekday,open_time,close_time,store_info_id,create_time,update_time,enterprise_id, delete_flag
)
select #{weekday},#{openTime},#{closeTime},store_info_id,now(),now(),enterprise_id, 1 from tab_store_info where overflow_status=0
select #{weekday},#{openTime},#{closeTime},store_info_id,now(),now(),enterprise_id, 0 from tab_store_info where overflow_status=0
and store_info_id in
<foreach collection="storeInfoIdList" index="index" item="storeInfoId" open="(" separator="," close=")">
#{storeInfoId}
......@@ -161,11 +157,11 @@
</insert>
<delete id="deleteAllByEnterpriseId" parameterType="java.lang.Integer">
update tab_store_business_time set status = 0
update tab_store_business_time set delete_flag = 1
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</delete>
<delete id="deleteBystoreInfoIds" parameterType="java.lang.Integer">
update tab_store_business_time set status = 0
update tab_store_business_time set delete_flag = 1
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and store_info_id in
<foreach collection="storeInfoIdList" index="index" item="storeInfoId" open="(" separator="," close=")">
......
......@@ -22,10 +22,6 @@
from tab_store_extend
where store_extend_id = #{storeExtendId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_store_extend
where store_extend_id = #{storeExtendId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabStoreExtend">
insert into tab_store_extend (store_extend_id, store_info_id, enterprise_id,
store_field_id, value, sort,
......
......@@ -5,12 +5,12 @@
<id column="field_region_id" jdbcType="INTEGER" property="fieldRegionId" />
<result column="region_id" jdbcType="INTEGER" property="regionId" />
<result column="store_field_id" jdbcType="INTEGER" property="storeFieldId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
field_region_id, region_id, store_field_id, status, create_time, update_time
field_region_id, region_id, store_field_id, delete_flag, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -18,16 +18,12 @@
from tab_store_field_region_rel
where field_region_id = #{fieldRegionId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_store_field_region_rel
where field_region_id = #{fieldRegionId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabStoreFieldRegionRel">
insert into tab_store_field_region_rel (field_region_id, region_id, store_field_id,
status, create_time, update_time
delete_flag, create_time, update_time
)
values (#{fieldRegionId,jdbcType=INTEGER}, #{regionId,jdbcType=INTEGER}, #{storeFieldId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
#{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.store.entity.TabStoreFieldRegionRel">
......@@ -42,8 +38,8 @@
<if test="storeFieldId != null">
store_field_id,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -62,8 +58,8 @@
<if test="storeFieldId != null">
#{storeFieldId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -82,8 +78,8 @@
<if test="storeFieldId != null">
store_field_id = #{storeFieldId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -98,21 +94,21 @@
update tab_store_field_region_rel
set region_id = #{regionId,jdbcType=INTEGER},
store_field_id = #{storeFieldId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where field_region_id = #{fieldRegionId,jdbcType=INTEGER}
</update>
<update id="deleteByStoreFieldId">
update tab_store_field_region_rel set status = 0
where status = 1
update tab_store_field_region_rel set delete_flag = 1
where delete_flag = 0
and store_field_id = #{storeFieldId}
</update>
<insert id="saveFetch" parameterType="java.util.List">
insert into tab_store_field_region_rel (field_region_id, region_id, store_field_id,
status, create_time, update_time
delete_flag, create_time, update_time
)
values
<foreach collection="list" item="item" index="index" separator=",">
......@@ -120,7 +116,7 @@
#{item.fieldRegionId},
#{item.regionId},
#{item.storeFieldId},
#{item.status},
#{item.deleteFlag},
#{item.createTime},
#{item.updateTime}
)
......@@ -130,7 +126,7 @@
<select id="listStoreFieldId" resultType="java.lang.Integer">
select store_field_id
from tab_store_field_region_rel
where status=1
where delete_flag=0
<if test="null != list and list.size() > 0">
and region_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......@@ -141,8 +137,8 @@
</select>
<update id="deleteFetchByStoreFieldIds" >
update tab_store_field_region_rel set status = 0
where status=1
update tab_store_field_region_rel set delete_flag = 1
where delete_flag=0
<if test="null != list and list.size() > 0">
and store_field_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......@@ -155,7 +151,7 @@
<select id="listByStoreFieldIdList" resultType="com.gic.store.dto.StoreFieldRegionMapDTO">
select store_field_id storeFieldId, GROUP_CONCAT(region_id separator '_') regionIds
from tab_store_field_region_rel
where status=1
where delete_flag=0
<if test="null != list and list.size() > 0">
and store_field_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......
......@@ -6,12 +6,12 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="store_field_id" jdbcType="INTEGER" property="storeFieldId" />
<result column="own_type" jdbcType="INTEGER" property="ownType" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
field_relation_id, enterprise_id, store_field_id, own_type, status, create_time,
field_relation_id, enterprise_id, store_field_id, own_type, delete_flag, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -20,16 +20,12 @@
from tab_store_field_rel
where field_relation_id = #{fieldRelationId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_store_field_rel
where field_relation_id = #{fieldRelationId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.store.entity.TabStoreFieldRel">
insert into tab_store_field_rel (field_relation_id, enterprise_id, store_field_id,
own_type, status, create_time,
own_type, delete_flag, create_time,
update_time)
values (#{fieldRelationId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{storeFieldId,jdbcType=INTEGER},
#{ownType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{ownType,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.store.entity.TabStoreFieldRel">
......@@ -47,8 +43,8 @@
<if test="ownType != null">
own_type,
</if>
<if test="status != null">
status,
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
......@@ -70,8 +66,8 @@
<if test="ownType != null">
#{ownType,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -93,8 +89,8 @@
<if test="ownType != null">
own_type = #{ownType,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -110,7 +106,7 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
store_field_id = #{storeFieldId,jdbcType=INTEGER},
own_type = #{ownType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where field_relation_id = #{fieldRelationId,jdbcType=INTEGER}
......@@ -120,7 +116,7 @@
select
<include refid="Base_Column_List" />
from tab_store_field_rel
where status = 1
where delete_flag = 1
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</if>
......@@ -130,8 +126,8 @@
<if test="ownType != null">
and own_type = #{ownType,jdbcType=INTEGER}
</if>
<if test="status != null">
and status = #{status,jdbcType=INTEGER}
<if test="deleteFlag != null">
and delete_flag = #{deleteFlag,jdbcType=INTEGER}
</if>
<if test="createTime != null">
and create_time = #{createTime,jdbcType=TIMESTAMP}
......@@ -142,8 +138,8 @@
</select>
<update id="deleteFetch">
update tab_store_field_rel set status = 0
where status = 1
update tab_store_field_rel set delete_flag = 1
where delete_flag = 0
and enterprise_id = #{enterpriseId}
<if test="null != list and list.size() > 0">
and store_field_id in
......@@ -155,7 +151,7 @@
<insert id="saveFetch" parameterType="java.util.List">
insert into tab_store_field_region_rel (field_relation_id, enterprise_id, store_field_id, own_type, status, create_time,
insert into tab_store_field_region_rel (field_relation_id, enterprise_id, store_field_id, own_type, delete_flag, create_time,
update_time
)
values
......@@ -165,7 +161,7 @@
#{item.enterpriseId},
#{item.storeFieldId},
#{item.ownType},
#{item.status},
#{item.deleteFlag},
#{item.createTime},
#{item.updateTime}
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment