Commit a4eaa288 by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-platform-enterprise into developer
parents 8a8f9c51 5e2a8859
......@@ -129,11 +129,6 @@ public class DoubleCallingRecordDTO implements Serializable {
@NotBlank(message = "说明不能为空", groups = DoubleCallingRecordValid.class)
private String remark;
/**
* 操作人
*/
private String operatorName;
public Integer getDoubleCallingRecordId() {
return doubleCallingRecordId;
}
......@@ -293,14 +288,4 @@ public class DoubleCallingRecordDTO implements Serializable {
public void setRemark(String remark) {
this.remark = remark;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
}
......@@ -115,6 +115,31 @@ public class InternationalSmsRecordDTO implements Serializable {
@NotBlank(message = "区号不能为空", groups = InternationalSmsRecordValid.class)
private String nationName;
/**
* 会员姓名
*/
private String memberName;
/**
* 门店id
*/
private Integer storeId;
/**
* 门店名称
*/
private String storeName;
/**
* 门店分组id
*/
private Integer storeGroupId;
/**
* 门店分组名称
*/
private String storeGroupName;
public Integer getSmsRecordId() {
return smsRecordId;
}
......
......@@ -14,7 +14,8 @@ import java.util.Date;
public class RecordingStorageRecordDTO implements Serializable {
private static final long serialVersionUID = -8391353045479614018L;
private interface RecordingStorageValid{}
private interface RecordingStorageValid {
}
/**
*
......@@ -113,8 +114,6 @@ public class RecordingStorageRecordDTO implements Serializable {
*/
private String remark;
private String operatorName;
public Integer getRecordingStorageRecordId() {
return recordingStorageRecordId;
}
......@@ -258,12 +257,4 @@ public class RecordingStorageRecordDTO implements Serializable {
public void setRemark(String remark) {
this.remark = remark;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
}
}
\ No newline at end of file
......@@ -107,6 +107,16 @@ public class SmsRecordDTO implements Serializable {
*/
private Integer deductType;
/**
* 缓存更新成功标志 1:成功
*/
private Integer cacheStatus;
/**
* 数据库更新成功标志 1:成功
*/
private Integer databaseStatus;
public Integer getSmsRecordId() {
return smsRecordId;
}
......@@ -242,4 +252,20 @@ public class SmsRecordDTO implements Serializable {
public void setDeductType(Integer deductType) {
this.deductType = deductType;
}
public Integer getCacheStatus() {
return cacheStatus;
}
public void setCacheStatus(Integer cacheStatus) {
this.cacheStatus = cacheStatus;
}
public Integer getDatabaseStatus() {
return databaseStatus;
}
public void setDatabaseStatus(Integer databaseStatus) {
this.databaseStatus = databaseStatus;
}
}
......@@ -79,7 +79,30 @@ public class VoiceCodeRecordDTO implements Serializable {
private Date deductionTime;
private String operatorName;
/**
* 会员姓名
*/
private String memberName;
/**
* 门店id
*/
private Integer storeId;
/**
* 门店名称
*/
private String storeName;
/**
* 门店分组id
*/
private Integer storeGroupId;
/**
* 门店分组名称
*/
private String storeGroupName;
public Integer getVoiceCodeRecordId() {
return voiceCodeRecordId;
......@@ -177,14 +200,6 @@ public class VoiceCodeRecordDTO implements Serializable {
this.paySerialNumber = paySerialNumber;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
public Date getDeductionTime() {
return deductionTime;
}
......@@ -192,4 +207,44 @@ public class VoiceCodeRecordDTO implements Serializable {
public void setDeductionTime(Date deductionTime) {
this.deductionTime = deductionTime;
}
public String getMemberName() {
return memberName;
}
public void setMemberName(String memberName) {
this.memberName = memberName;
}
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public Integer getStoreGroupId() {
return storeGroupId;
}
public void setStoreGroupId(Integer storeGroupId) {
this.storeGroupId = storeGroupId;
}
public String getStoreGroupName() {
return storeGroupName;
}
public void setStoreGroupName(String storeGroupName) {
this.storeGroupName = storeGroupName;
}
}
......@@ -39,29 +39,29 @@ public interface LinkApiService {
*/
ServiceResponse<Void> updateLinkType(Integer linkId, String name, Integer type);
/**
* 保存链接菜单
* @Title: saveLinkMenu
* @Description:
* @author zhiwj
* @param parentId
* @param name
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse<Void> saveLinkMenu(Integer parentId, String name, Integer type);
/**
* 更新菜单
* @Title: updateLinkMenu
* @Description:
* @author zhiwj
* @param linkId
* @param name
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse<Void> updateLinkMenu(Integer linkId, String name, Integer type);
// /**
// * 保存链接菜单
// * @Title: saveLinkMenu
// * @Description:
// * @author zhiwj
// * @param parentId
// * @param name
// * @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
// * @throws
// */
// ServiceResponse<Void> saveLinkMenu(Integer parentId, String name, Integer type);
//
// /**
// * 更新菜单
// * @Title: updateLinkMenu
// * @Description:
// * @author zhiwj
// * @param linkId
// * @param name
// * @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
// * @throws
// */
// ServiceResponse<Void> updateLinkMenu(Integer linkId, String name, Integer type);
/**
* 保存子菜单
......@@ -160,5 +160,5 @@ public interface LinkApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.enterprise.dto.LinkDTO>>
* @throws
*/
ServiceResponse<List<LinkDTO>> treeByGic(Integer enterpriseId);
ServiceResponse<List<LinkDTO>> treeByGic(Integer enterpriseId, Integer objectType);
}
......@@ -70,5 +70,5 @@ public interface TabLinkMapper {
List<TabLink> listByGic(@Param("enterpriseId") Integer enterpriseId, @Param("parentId") Integer parentId);
List<TabLink> treeByGic(@Param("enterpriseId") Integer enterpriseId);
List<TabLink> treeByGic(@Param("enterpriseId") Integer enterpriseId, @Param("objectType") Integer objectType);
}
\ No newline at end of file
......@@ -81,6 +81,16 @@ public class TabBillingAccountBalanceRecord {
*/
private Double feeDiscount;
/**
* 操作人id
*/
private Integer operatorId;
/**
* 操作人name
*/
private String operatorName;
public Integer getAccountBalanceRecordId() {
return accountBalanceRecordId;
}
......@@ -200,4 +210,20 @@ public class TabBillingAccountBalanceRecord {
public void setFeeDiscount(Double feeDiscount) {
this.feeDiscount = feeDiscount;
}
public Integer getOperatorId() {
return operatorId;
}
public void setOperatorId(Integer operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
}
\ No newline at end of file
......@@ -96,6 +96,31 @@ public class TabBillingInternationalSmsRecord {
*/
private String nationName;
/**
* 会员姓名
*/
private String memberName;
/**
* 门店id
*/
private Integer storeId;
/**
* 门店名称
*/
private String storeName;
/**
* 门店分组id
*/
private Integer storeGroupId;
/**
* 门店分组名称
*/
private String storeGroupName;
public Integer getSmsRecordId() {
return smsRecordId;
}
......@@ -239,4 +264,44 @@ public class TabBillingInternationalSmsRecord {
public void setNationName(String nationName) {
this.nationName = nationName;
}
public String getMemberName() {
return memberName;
}
public void setMemberName(String memberName) {
this.memberName = memberName;
}
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public Integer getStoreGroupId() {
return storeGroupId;
}
public void setStoreGroupId(Integer storeGroupId) {
this.storeGroupId = storeGroupId;
}
public String getStoreGroupName() {
return storeGroupName;
}
public void setStoreGroupName(String storeGroupName) {
this.storeGroupName = storeGroupName;
}
}
\ No newline at end of file
......@@ -77,12 +77,27 @@ public class TabBillingRecordingStorageRecord {
private String storageDuration;
/**
* 服务门店
* 会员姓名
*/
private String memberName;
/**
* 门店id
*/
private Integer storeId;
/**
* 门店名称
*/
private String storeName;
/**
* 门店分组
* 门店分组id
*/
private Integer storeGroupId;
/**
* 门店分组名称
*/
private String storeGroupName;
......@@ -92,7 +107,7 @@ public class TabBillingRecordingStorageRecord {
private Date callTime;
/**
* 备注
* 备注说明
*/
private String remark;
......@@ -208,6 +223,22 @@ public class TabBillingRecordingStorageRecord {
this.storageDuration = storageDuration;
}
public String getMemberName() {
return memberName;
}
public void setMemberName(String memberName) {
this.memberName = memberName;
}
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
......@@ -216,6 +247,14 @@ public class TabBillingRecordingStorageRecord {
this.storeName = storeName;
}
public Integer getStoreGroupId() {
return storeGroupId;
}
public void setStoreGroupId(Integer storeGroupId) {
this.storeGroupId = storeGroupId;
}
public String getStoreGroupName() {
return storeGroupName;
}
......
......@@ -81,6 +81,16 @@ public class TabBillingSmsPackageRecord {
*/
private Double paidFee;
/**
* 操作人id
*/
private Integer operatorId;
/**
* 操作人name
*/
private String operatorName;
public Integer getSmsPackageRecordId() {
return smsPackageRecordId;
}
......@@ -200,4 +210,20 @@ public class TabBillingSmsPackageRecord {
public void setPaidFee(Double paidFee) {
this.paidFee = paidFee;
}
public Integer getOperatorId() {
return operatorId;
}
public void setOperatorId(Integer operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
}
\ No newline at end of file
......@@ -111,6 +111,16 @@ public class TabBillingSmsRecord {
*/
private String storeGroupName;
/**
* 缓存更新成功标志 1:成功
*/
private Integer cacheStatus;
/**
* 数据库更新成功标志 1:成功
*/
private Integer databaseStatus;
public Integer getSmsRecordId() {
return smsRecordId;
}
......@@ -278,4 +288,20 @@ public class TabBillingSmsRecord {
public void setStoreGroupName(String storeGroupName) {
this.storeGroupName = storeGroupName;
}
public Integer getCacheStatus() {
return cacheStatus;
}
public void setCacheStatus(Integer cacheStatus) {
this.cacheStatus = cacheStatus;
}
public Integer getDatabaseStatus() {
return databaseStatus;
}
public void setDatabaseStatus(Integer databaseStatus) {
this.databaseStatus = databaseStatus;
}
}
\ No newline at end of file
......@@ -71,6 +71,31 @@ public class TabBillingVoiceCodeRecord {
*/
private Date deductionTime;
/**
* 会员姓名
*/
private String memberName;
/**
* 门店id
*/
private Integer storeId;
/**
* 门店名称
*/
private String storeName;
/**
* 门店分组id
*/
private Integer storeGroupId;
/**
* 门店分组名称
*/
private String storeGroupName;
public Integer getVoiceCodeRecordId() {
return voiceCodeRecordId;
}
......@@ -174,4 +199,44 @@ public class TabBillingVoiceCodeRecord {
public void setDeductionTime(Date deductionTime) {
this.deductionTime = deductionTime;
}
public String getMemberName() {
return memberName;
}
public void setMemberName(String memberName) {
this.memberName = memberName;
}
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public Integer getStoreGroupId() {
return storeGroupId;
}
public void setStoreGroupId(Integer storeGroupId) {
this.storeGroupId = storeGroupId;
}
public String getStoreGroupName() {
return storeGroupName;
}
public void setStoreGroupName(String storeGroupName) {
this.storeGroupName = storeGroupName;
}
}
\ No newline at end of file
......@@ -48,4 +48,7 @@ public interface BillingSmsRecordService {
Integer saveSmsRecord(SmsRecordDTO smsRecordDTO);
void updateCacheStatus(Integer smsRecordId);
void updateDatabaseStatus(Integer smsRecordId);
}
......@@ -20,9 +20,9 @@ public interface LinkService {
int updateLinkType(Integer linkId, String name, Integer type);
Integer saveLinkMenu(Integer parentId, String name, Integer type);
int updateLinkMenu(Integer linkId, String name, Integer type);
// Integer saveLinkMenu(Integer parentId, String name, Integer type);
//
// int updateLinkMenu(Integer linkId, String name, Integer type);
void updateLinkMenu(LinkDTO linkDTO);
......@@ -44,5 +44,5 @@ public interface LinkService {
List<TabLink> listByGic(Integer enterpriseId, Integer parentId);
List<TabLink> treeByGic(Integer enterpriseId);
List<TabLink> treeByGic(Integer enterpriseId, Integer objectType);
}
......@@ -63,6 +63,23 @@ public class BillingSmsRecordServiceImpl implements BillingSmsRecordService{
TabBillingSmsRecord billingSmsRecord = EntityUtil.changeEntityByJSON(TabBillingSmsRecord.class, smsRecordDTO);
billingSmsRecord.setStatus(GlobalInfo.DATA_STATUS_NORMAL);
billingSmsRecord.setCreateTime(new Date());
return tabBillingSmsRecordMapper.insertSelective(billingSmsRecord);
tabBillingSmsRecordMapper.insertSelective(billingSmsRecord);
return billingSmsRecord.getSmsRecordId();
}
@Override
public void updateCacheStatus(Integer smsRecordId) {
TabBillingSmsRecord smsRecord = new TabBillingSmsRecord();
smsRecord.setSmsRecordId(smsRecordId);
smsRecord.setCacheStatus(1);
tabBillingSmsRecordMapper.updateByPrimaryKeySelective(smsRecord);
}
@Override
public void updateDatabaseStatus(Integer smsRecordId) {
TabBillingSmsRecord smsRecord = new TabBillingSmsRecord();
smsRecord.setSmsRecordId(smsRecordId);
smsRecord.setDatabaseStatus(1);
tabBillingSmsRecordMapper.updateByPrimaryKeySelective(smsRecord);
}
}
......@@ -64,28 +64,28 @@ public class LinkServiceImpl implements LinkService {
return tabLinkMapper.updateByPrimaryKeySelective(tabLink);
}
@Override
public Integer saveLinkMenu(Integer parentId, String name, Integer type) {
TabLink tabLink = new TabLink();
tabLink.setCreateTime(new Date());
tabLink.setParentId(parentId);
tabLink.setStatus(Constants.NORMAL_STATUS);
tabLink.setType(type);
tabLink.setName(name);
tabLink.setIsCustom(Constants.NORMAL_STATUS);
tabLink.setEnterpriseType(LinkEnterpriseTypeEnum.ALL.getCode());
tabLinkMapper.insertSelective(tabLink);
return tabLink.getLinkId();
}
@Override
public int updateLinkMenu(Integer linkId, String name, Integer type) {
TabLink tabLink = new TabLink();
tabLink.setLinkId(linkId);
tabLink.setName(name);
tabLink.setType(type);
return tabLinkMapper.updateByPrimaryKeySelective(tabLink);
}
// @Override
// public Integer saveLinkMenu(Integer parentId, String name, Integer type) {
// TabLink tabLink = new TabLink();
// tabLink.setCreateTime(new Date());
// tabLink.setParentId(parentId);
// tabLink.setStatus(Constants.NORMAL_STATUS);
// tabLink.setType(type);
// tabLink.setName(name);
// tabLink.setIsCustom(Constants.NORMAL_STATUS);
// tabLink.setEnterpriseType(LinkEnterpriseTypeEnum.ALL.getCode());
// tabLinkMapper.insertSelective(tabLink);
// return tabLink.getLinkId();
// }
//
// @Override
// public int updateLinkMenu(Integer linkId, String name, Integer type) {
// TabLink tabLink = new TabLink();
// tabLink.setLinkId(linkId);
// tabLink.setName(name);
// tabLink.setType(type);
// return tabLinkMapper.updateByPrimaryKeySelective(tabLink);
// }
@Override
public void updateLinkMenu(LinkDTO linkDTO) {
......@@ -99,9 +99,16 @@ public class LinkServiceImpl implements LinkService {
tabLink.setCreateTime(new Date());
tabLink.setParentId(linkDTO.getParentId());
tabLink.setStatus(Constants.NORMAL_STATUS);
tabLink.setType(LinkTypeEnum.COMMON_LINK.getCode());
tabLink.setIsCustom(Constants.NORMAL_STATUS);
tabLink.setEnterpriseType(LinkEnterpriseTypeEnum.ALL.getCode());
if (StringUtils.isBlank(linkDTO.getAppletContent()) && StringUtils.isBlank(linkDTO.getH5Content())) {
tabLink.setObjectType(null);
tabLink.setType(LinkTypeEnum.HIERARCHICAL.getCode());
} else {
tabLink.setObjectType(linkDTO.getObjectType());
tabLink.setType(LinkTypeEnum.HIERARCHICAL.getCode());
}
tabLinkMapper.insertSelective(tabLink);
return tabLink.getLinkId();
}
......@@ -114,6 +121,16 @@ public class LinkServiceImpl implements LinkService {
tabLink.setName(linkDTO.getName());
tabLink.setH5Content(linkDTO.getH5Content());
tabLink.setAppletContent(linkDTO.getAppletContent());
if (StringUtils.isBlank(linkDTO.getAppletContent()) && StringUtils.isBlank(linkDTO.getH5Content())) {
tabLink.setObjectType(null);
tabLink.setType(LinkTypeEnum.HIERARCHICAL.getCode());
} else {
tabLink.setObjectType(linkDTO.getObjectType());
TabLink oldLink = tabLinkMapper.selectByPrimaryKey(linkDTO.getLinkId());
if (LinkTypeEnum.HIERARCHICAL.getCode().equals(oldLink.getType())) {
tabLink.setType(LinkTypeEnum.COMMON_LINK.getCode());
}
}
return tabLinkMapper.updateByPrimaryKeySelective(tabLink);
}
......@@ -171,8 +188,8 @@ public class LinkServiceImpl implements LinkService {
}
@Override
public List<TabLink> treeByGic(Integer enterpriseId) {
return tabLinkMapper.treeByGic(enterpriseId);
public List<TabLink> treeByGic(Integer enterpriseId, Integer objectType) {
return tabLinkMapper.treeByGic(enterpriseId, objectType);
}
}
......@@ -5,7 +5,6 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.constant.LinkEnterpriseTypeEnum;
import com.gic.enterprise.constant.LinkTypeEnum;
import com.gic.enterprise.dto.LinkDTO;
import com.gic.enterprise.entity.TabLink;
import com.gic.enterprise.error.ErrorCode;
......@@ -63,36 +62,36 @@ public class LinkApiServiceImpl implements LinkApiService {
}
}
@Override
public ServiceResponse<Void> saveLinkMenu(Integer parentId, String name, Integer type) {
boolean nameIsRepeat = linkService.validNameIsRepeat(name, null);
if (nameIsRepeat) {
return EnterpriseServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "名称重复");
}
if (type == null) {
type = LinkTypeEnum.HIERARCHICAL.getCode();
}
Integer linkId = linkService.saveLinkMenu(parentId, name, type);
linkSceneService.editLinkEnterprise(linkId, Collections.singletonList(-1));
return EnterpriseServiceResponse.success();
}
@Override
public ServiceResponse<Void> updateLinkMenu(Integer linkId, String name, Integer type) {
boolean nameIsRepeat = linkService.validNameIsRepeat(name, linkId);
if (nameIsRepeat) {
return EnterpriseServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "名称重复");
}
if (type == null) {
type = LinkTypeEnum.HIERARCHICAL.getCode();
}
int i = linkService.updateLinkMenu(linkId, name, type);
if (i > 0) {
return EnterpriseServiceResponse.success();
} else {
return EnterpriseServiceResponse.failure(ErrorCode.NOTEXISTS);
}
}
// @Override
// public ServiceResponse<Void> saveLinkMenu(Integer parentId, String name, Integer type) {
// boolean nameIsRepeat = linkService.validNameIsRepeat(name, null);
// if (nameIsRepeat) {
// return EnterpriseServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "名称重复");
// }
// if (type == null) {
// type = LinkTypeEnum.HIERARCHICAL.getCode();
// }
// Integer linkId = linkService.saveLinkMenu(parentId, name, type);
// linkSceneService.editLinkEnterprise(linkId, Collections.singletonList(-1));
// return EnterpriseServiceResponse.success();
// }
//
// @Override
// public ServiceResponse<Void> updateLinkMenu(Integer linkId, String name, Integer type) {
// boolean nameIsRepeat = linkService.validNameIsRepeat(name, linkId);
// if (nameIsRepeat) {
// return EnterpriseServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "名称重复");
// }
// if (type == null) {
// type = LinkTypeEnum.HIERARCHICAL.getCode();
// }
// int i = linkService.updateLinkMenu(linkId, name, type);
// if (i > 0) {
// return EnterpriseServiceResponse.success();
// } else {
// return EnterpriseServiceResponse.failure(ErrorCode.NOTEXISTS);
// }
// }
@Override
public ServiceResponse<Void> saveLinkChildMenu(LinkDTO linkDTO) {
......@@ -195,8 +194,8 @@ public class LinkApiServiceImpl implements LinkApiService {
}
@Override
public ServiceResponse<List<LinkDTO>> treeByGic(Integer enterpriseId) {
List<TabLink> linkList = this.linkService.treeByGic(enterpriseId);
public ServiceResponse<List<LinkDTO>> treeByGic(Integer enterpriseId, Integer objectType) {
List<TabLink> linkList = this.linkService.treeByGic(enterpriseId, objectType);
List<LinkDTO> dtoList = EntityUtil.changeEntityListByJSON(LinkDTO.class, linkList);
List<LinkDTO> treeList = toTree(dtoList);
return EnterpriseServiceResponse.success(treeList);
......
......@@ -67,6 +67,10 @@ public class SmsRecordApiServiceImpl implements SmsRecordApiService {
try {
logger.info("国内短信缓存扣费:{}", arg);
SmsRecordDTO smsRecordDTO = JSON.parseObject(arg, SmsRecordDTO.class);
smsRecordDTO.setCacheStatus(0);
smsRecordDTO.setDatabaseStatus(0);
Integer smsRecordId = billingSmsRecordService.saveSmsRecord(smsRecordDTO);
smsRecordDTO.setSmsRecordId(smsRecordId);
// 判断是扣套餐包还是扣余额
RedissonClient redisClient = RedisUtil.getRedisClient();
RAtomicLong smsCount = redisClient.getAtomicLong(Constants.ENTERPRISE_BILLING_SMS_PACKAGE_COUNT + smsRecordDTO.getEnterpriseId());
......@@ -75,8 +79,9 @@ public class SmsRecordApiServiceImpl implements SmsRecordApiService {
int deductType = deduct(smsCount, smsRecordDTO.getEnterpriseId());
smsRecordDTO.setDeductType(deductType);
// todo 队列
// 队列
client.sendMessage("smsDbMq", JSON.toJSONString(smsRecordDTO));
billingSmsRecordService.updateCacheStatus(smsRecordDTO.getSmsRecordId());
// this.executeDatabase(JSON.toJSONString(smsRecordDTO));
} catch (Exception e) {
logger.warn("调用mq失败", e);
......@@ -128,7 +133,7 @@ public class SmsRecordApiServiceImpl implements SmsRecordApiService {
Integer unitFee = accountStandardService.queryUnitFee(smsRecordDTO.getEnterpriseId(), AccountStandardEnum.SMS.getCode());
billingAccountService.deductAccountByDatabase(unitFee.doubleValue() / 1000, smsRecordDTO.getEnterpriseId());
}
billingSmsRecordService.saveSmsRecord(smsRecordDTO);
billingSmsRecordService.updateDatabaseStatus(smsRecordDTO.getSmsRecordId());
return ServiceResponse.success();
}
}
......@@ -17,11 +17,13 @@
<result column="fee" jdbcType="DOUBLE" property="fee" />
<result column="fee_paid" jdbcType="DOUBLE" property="feePaid" />
<result column="fee_discount" jdbcType="DOUBLE" property="feeDiscount" />
<result column="operator_id" jdbcType="INTEGER" property="operatorId" />
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
</resultMap>
<sql id="Base_Column_List">
account_balance_record_id, product_name, pay_type, status, product_type, bill_type,
create_time, order_id, deduction_time, enterprise_id, order_serial_number, request_code,
fee, fee_paid, fee_discount
fee, fee_paid, fee_discount, operator_id, operator_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -39,13 +41,15 @@
bill_type, create_time, order_id,
deduction_time, enterprise_id, order_serial_number,
request_code, fee, fee_paid,
fee_discount)
fee_discount, operator_id, operator_name
)
values (#{accountBalanceRecordId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR},
#{payType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{productType,jdbcType=INTEGER},
#{billType,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{orderId,jdbcType=INTEGER},
#{deductionTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{orderSerialNumber,jdbcType=VARCHAR},
#{requestCode,jdbcType=VARCHAR}, #{fee,jdbcType=DOUBLE}, #{feePaid,jdbcType=DOUBLE},
#{feeDiscount,jdbcType=DOUBLE})
#{feeDiscount,jdbcType=DOUBLE}, #{operatorId,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingAccountBalanceRecord">
insert into tab_billing_account_balance_record
......@@ -95,6 +99,12 @@
<if test="feeDiscount != null">
fee_discount,
</if>
<if test="operatorId != null">
operator_id,
</if>
<if test="operatorName != null">
operator_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="accountBalanceRecordId != null">
......@@ -142,6 +152,12 @@
<if test="feeDiscount != null">
#{feeDiscount,jdbcType=DOUBLE},
</if>
<if test="operatorId != null">
#{operatorId,jdbcType=INTEGER},
</if>
<if test="operatorName != null">
#{operatorName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingAccountBalanceRecord">
......@@ -189,6 +205,12 @@
<if test="feeDiscount != null">
fee_discount = #{feeDiscount,jdbcType=DOUBLE},
</if>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=INTEGER},
</if>
<if test="operatorName != null">
operator_name = #{operatorName,jdbcType=VARCHAR},
</if>
</set>
where account_balance_record_id = #{accountBalanceRecordId,jdbcType=INTEGER}
</update>
......@@ -207,7 +229,9 @@
request_code = #{requestCode,jdbcType=VARCHAR},
fee = #{fee,jdbcType=DOUBLE},
fee_paid = #{feePaid,jdbcType=DOUBLE},
fee_discount = #{feeDiscount,jdbcType=DOUBLE}
fee_discount = #{feeDiscount,jdbcType=DOUBLE},
operator_id = #{operatorId,jdbcType=INTEGER},
operator_name = #{operatorName,jdbcType=VARCHAR}
where account_balance_record_id = #{accountBalanceRecordId,jdbcType=INTEGER}
</update>
......
......@@ -20,11 +20,17 @@
<result column="enterprise_sms_package_id" jdbcType="INTEGER" property="enterpriseSmsPackageId" />
<result column="nation_code" jdbcType="VARCHAR" property="nationCode" />
<result column="nation_name" jdbcType="VARCHAR" property="nationName" />
<result column="member_name" jdbcType="VARCHAR" property="memberName" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="store_group_name" jdbcType="VARCHAR" property="storeGroupName" />
</resultMap>
<sql id="Base_Column_List">
sms_record_id, status, send_time, receive_phone, pay_type, app_code, app_name, sms_type,
sms_record_id, status, send_time, receive_phone, pay_type, app_code, app_name, sms_type,
bill_number, fee, sms_content, create_time, update_time, deduction_time, enterprise_id,
enterprise_sms_package_id, nation_code, nation_name
enterprise_sms_package_id, nation_code, nation_name, member_name, store_id, store_name,
store_group_id, store_group_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -38,19 +44,21 @@
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingInternationalSmsRecord">
insert into tab_billing_international_sms_record (sms_record_id, status, send_time,
receive_phone, pay_type, app_code,
receive_phone, pay_type, app_code,
app_name, sms_type, bill_number,
fee, sms_content, create_time,
update_time, deduction_time, enterprise_id,
enterprise_sms_package_id, nation_code, nation_name
)
enterprise_sms_package_id, nation_code, nation_name,
member_name, store_id, store_name,
store_group_id, store_group_name)
values (#{smsRecordId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{sendTime,jdbcType=TIMESTAMP},
#{receivePhone,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, #{appCode,jdbcType=VARCHAR},
#{receivePhone,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, #{appCode,jdbcType=VARCHAR},
#{appName,jdbcType=VARCHAR}, #{smsType,jdbcType=INTEGER}, #{billNumber,jdbcType=INTEGER},
#{fee,jdbcType=DOUBLE}, #{smsContent,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER},
#{enterpriseSmsPackageId,jdbcType=INTEGER}, #{nationCode,jdbcType=VARCHAR}, #{nationName,jdbcType=VARCHAR}
)
#{enterpriseSmsPackageId,jdbcType=INTEGER}, #{nationCode,jdbcType=VARCHAR}, #{nationName,jdbcType=VARCHAR},
#{memberName,jdbcType=VARCHAR}, #{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR},
#{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingInternationalSmsRecord">
insert into tab_billing_international_sms_record
......@@ -109,6 +117,21 @@
<if test="nationName != null">
nation_name,
</if>
<if test="memberName != null">
member_name,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="storeGroupId != null">
store_group_id,
</if>
<if test="storeGroupName != null">
store_group_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="smsRecordId != null">
......@@ -165,6 +188,21 @@
<if test="nationName != null">
#{nationName,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
#{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
#{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
#{storeGroupName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingInternationalSmsRecord">
......@@ -221,6 +259,21 @@
<if test="nationName != null">
nation_name = #{nationName,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
member_name = #{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
store_group_id = #{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
</if>
</set>
where sms_record_id = #{smsRecordId,jdbcType=INTEGER}
</update>
......@@ -242,7 +295,12 @@
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER},
nation_code = #{nationCode,jdbcType=VARCHAR},
nation_name = #{nationName,jdbcType=VARCHAR}
nation_name = #{nationName,jdbcType=VARCHAR},
member_name = #{memberName,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=INTEGER},
store_group_name = #{storeGroupName,jdbcType=VARCHAR}
where sms_record_id = #{smsRecordId,jdbcType=INTEGER}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
......@@ -253,7 +311,7 @@
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') >= #{startTime}
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
......@@ -295,7 +353,7 @@
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') >= #{startTime}
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
......@@ -318,7 +376,7 @@
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') >= #{startTime}
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
......
......@@ -16,7 +16,10 @@
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="pay_serial_number" jdbcType="VARCHAR" property="paySerialNumber" />
<result column="storage_duration" jdbcType="VARCHAR" property="storageDuration" />
<result column="member_name" jdbcType="VARCHAR" property="memberName" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="store_group_name" jdbcType="VARCHAR" property="storeGroupName" />
<result column="call_time" jdbcType="TIMESTAMP" property="callTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
......@@ -24,7 +27,8 @@
<sql id="Base_Column_List">
recording_storage_record_id, caller_name, caller_phone, fee, status, create_time,
deduction_time, called_phone, app_code, app_name, voice_time, enterprise_id, pay_serial_number,
storage_duration, store_name, store_group_name, call_time, remark
storage_duration, member_name, store_id, store_name, store_group_id, store_group_name,
call_time, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -42,14 +46,16 @@
create_time, deduction_time, called_phone,
app_code, app_name, voice_time,
enterprise_id, pay_serial_number, storage_duration,
store_name, store_group_name, call_time,
member_name, store_id, store_name,
store_group_id, store_group_name, call_time,
remark)
values (#{recordingStorageRecordId,jdbcType=INTEGER}, #{callerName,jdbcType=VARCHAR},
#{callerPhone,jdbcType=VARCHAR}, #{fee,jdbcType=DOUBLE}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP}, #{calledPhone,jdbcType=VARCHAR},
#{appCode,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR}, #{voiceTime,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{paySerialNumber,jdbcType=VARCHAR}, #{storageDuration,jdbcType=VARCHAR},
#{storeName,jdbcType=VARCHAR}, #{storeGroupName,jdbcType=VARCHAR}, #{callTime,jdbcType=TIMESTAMP},
#{memberName,jdbcType=VARCHAR}, #{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR},
#{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR}, #{callTime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingRecordingStorageRecord">
......@@ -97,9 +103,18 @@
<if test="storageDuration != null">
storage_duration,
</if>
<if test="memberName != null">
member_name,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="storeGroupId != null">
store_group_id,
</if>
<if test="storeGroupName != null">
store_group_name,
</if>
......@@ -153,9 +168,18 @@
<if test="storageDuration != null">
#{storageDuration,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
#{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
#{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
#{storeGroupName,jdbcType=VARCHAR},
</if>
......@@ -209,9 +233,18 @@
<if test="storageDuration != null">
storage_duration = #{storageDuration,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
member_name = #{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
store_group_id = #{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
</if>
......@@ -239,7 +272,10 @@
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
storage_duration = #{storageDuration,jdbcType=VARCHAR},
member_name = #{memberName,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=INTEGER},
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
call_time = #{callTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
......
......@@ -17,11 +17,13 @@
<result column="card_name" jdbcType="VARCHAR" property="cardName" />
<result column="card_amount" jdbcType="DOUBLE" property="cardAmount" />
<result column="paid_fee" jdbcType="DOUBLE" property="paidFee" />
<result column="operator_id" jdbcType="INTEGER" property="operatorId" />
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
</resultMap>
<sql id="Base_Column_List">
sms_package_record_id, product_name, item_count, item_fee, total_fee, pay_type, status,
create_time, order_id, deduction_time, enterprise_id, discount_type, card_name, card_amount,
paid_fee
paid_fee, operator_id, operator_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -39,13 +41,15 @@
pay_type, status, create_time,
order_id, deduction_time, enterprise_id,
discount_type, card_name, card_amount,
paid_fee)
paid_fee, operator_id, operator_name
)
values (#{smsPackageRecordId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR},
#{itemCount,jdbcType=INTEGER}, #{itemFee,jdbcType=DOUBLE}, #{totalFee,jdbcType=DOUBLE},
#{payType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{orderId,jdbcType=INTEGER}, #{deductionTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER},
#{discountType,jdbcType=INTEGER}, #{cardName,jdbcType=VARCHAR}, #{cardAmount,jdbcType=DOUBLE},
#{paidFee,jdbcType=DOUBLE})
#{paidFee,jdbcType=DOUBLE}, #{operatorId,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingSmsPackageRecord">
insert into tab_billing_sms_package_record
......@@ -95,6 +99,12 @@
<if test="paidFee != null">
paid_fee,
</if>
<if test="operatorId != null">
operator_id,
</if>
<if test="operatorName != null">
operator_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="smsPackageRecordId != null">
......@@ -142,6 +152,12 @@
<if test="paidFee != null">
#{paidFee,jdbcType=DOUBLE},
</if>
<if test="operatorId != null">
#{operatorId,jdbcType=INTEGER},
</if>
<if test="operatorName != null">
#{operatorName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingSmsPackageRecord">
......@@ -189,6 +205,12 @@
<if test="paidFee != null">
paid_fee = #{paidFee,jdbcType=DOUBLE},
</if>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=INTEGER},
</if>
<if test="operatorName != null">
operator_name = #{operatorName,jdbcType=VARCHAR},
</if>
</set>
where sms_package_record_id = #{smsPackageRecordId,jdbcType=INTEGER}
</update>
......@@ -207,7 +229,9 @@
discount_type = #{discountType,jdbcType=INTEGER},
card_name = #{cardName,jdbcType=VARCHAR},
card_amount = #{cardAmount,jdbcType=DOUBLE},
paid_fee = #{paidFee,jdbcType=DOUBLE}
paid_fee = #{paidFee,jdbcType=DOUBLE},
operator_id = #{operatorId,jdbcType=INTEGER},
operator_name = #{operatorName,jdbcType=VARCHAR}
where sms_package_record_id = #{smsPackageRecordId,jdbcType=INTEGER}
</update>
......
......@@ -23,11 +23,14 @@
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="store_group_name" jdbcType="VARCHAR" property="storeGroupName" />
<result column="cache_status" jdbcType="INTEGER" property="cacheStatus" />
<result column="database_status" jdbcType="INTEGER" property="databaseStatus" />
</resultMap>
<sql id="Base_Column_List">
sms_record_id, status, send_time, receive_phone, pay_type, app_code, app_name, sms_type,
bill_number, fee, sms_content, create_time, update_time, deduction_time, enterprise_id,
enterprise_sms_package_id, member_name, store_id, store_name, store_group_id, store_group_name
enterprise_sms_package_id, member_name, store_id, store_name, store_group_id, store_group_name,
cache_status, database_status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -46,18 +49,21 @@
fee, sms_content, create_time,
update_time, deduction_time, enterprise_id,
enterprise_sms_package_id, member_name, store_id,
store_name, store_group_id, store_group_name
)
store_name, store_group_id, store_group_name,
cache_status, database_status)
values (#{smsRecordId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{sendTime,jdbcType=TIMESTAMP},
#{receivePhone,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, #{appCode,jdbcType=VARCHAR},
#{appName,jdbcType=VARCHAR}, #{smsType,jdbcType=INTEGER}, #{billNumber,jdbcType=INTEGER},
#{fee,jdbcType=DOUBLE}, #{smsContent,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER},
#{enterpriseSmsPackageId,jdbcType=INTEGER}, #{memberName,jdbcType=VARCHAR}, #{storeId,jdbcType=INTEGER},
#{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR}
)
#{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR},
#{cacheStatus,jdbcType=INTEGER}, #{databaseStatus,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingSmsRecord">
<selectKey keyProperty="smsRecordId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_billing_sms_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="smsRecordId != null">
......@@ -123,6 +129,12 @@
<if test="storeGroupName != null">
store_group_name,
</if>
<if test="cacheStatus != null">
cache_status,
</if>
<if test="databaseStatus != null">
database_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="smsRecordId != null">
......@@ -188,6 +200,12 @@
<if test="storeGroupName != null">
#{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="cacheStatus != null">
#{cacheStatus,jdbcType=INTEGER},
</if>
<if test="databaseStatus != null">
#{databaseStatus,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingSmsRecord">
......@@ -253,6 +271,12 @@
<if test="storeGroupName != null">
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="cacheStatus != null">
cache_status = #{cacheStatus,jdbcType=INTEGER},
</if>
<if test="databaseStatus != null">
database_status = #{databaseStatus,jdbcType=INTEGER},
</if>
</set>
where sms_record_id = #{smsRecordId,jdbcType=INTEGER}
</update>
......@@ -277,7 +301,9 @@
store_id = #{storeId,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=INTEGER},
store_group_name = #{storeGroupName,jdbcType=VARCHAR}
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
cache_status = #{cacheStatus,jdbcType=INTEGER},
database_status = #{databaseStatus,jdbcType=INTEGER}
where sms_record_id = #{smsRecordId,jdbcType=INTEGER}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
......@@ -286,6 +312,8 @@
ifnull(sum(fee), 0) fee
from tab_billing_sms_record
where status = 1
and cache_status = 1
and database_status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
......@@ -301,6 +329,8 @@
ifnull(sum(fee), 0)
from tab_billing_sms_record
where status = 1
and cache_status = 1
and database_status = 1
and enterprise_id = #{enterpriseId}
<if test="dateType == 1 ">
and date_format(deduction_time,'%Y-%m') = date_format(now(),'%Y-%m')
......@@ -314,6 +344,8 @@
ifnull(sum(fee), 0)
from tab_billing_sms_record
where status = 1
and cache_status = 1
and database_status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
......@@ -327,6 +359,8 @@
<include refid="Base_Column_List" />
from tab_billing_sms_record
where status = 1
and cache_status = 1
and database_status = 1
and enterprise_sms_package_id=#{smsPackageId}
<if test="search != null ">
and sms_content like concat('%',#{search}, '%')
......@@ -344,6 +378,8 @@
<include refid="Base_Column_List" />
from tab_billing_sms_record
<where>
and cache_status = 1
and database_status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
......@@ -370,6 +406,8 @@
count(*)
from tab_billing_sms_record
<where>
and cache_status = 1
and database_status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
......
......@@ -15,10 +15,16 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="member_name" jdbcType="VARCHAR" property="memberName" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="store_group_name" jdbcType="VARCHAR" property="storeGroupName" />
</resultMap>
<sql id="Base_Column_List">
voice_code_record_id, pay_serial_number, status, send_time, receive_phone, voice_time,
app_code, app_name, fee, create_time, update_time, enterprise_id, deduction_time
app_code, app_name, fee, create_time, update_time, enterprise_id, deduction_time,
member_name, store_id, store_name, store_group_id, store_group_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -35,12 +41,16 @@
status, send_time, receive_phone,
voice_time, app_code, app_name,
fee, create_time, update_time,
enterprise_id, deduction_time)
enterprise_id, deduction_time, member_name,
store_id, store_name, store_group_id,
store_group_name)
values (#{voiceCodeRecordId,jdbcType=INTEGER}, #{paySerialNumber,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{sendTime,jdbcType=TIMESTAMP}, #{receivePhone,jdbcType=VARCHAR},
#{voiceTime,jdbcType=VARCHAR}, #{appCode,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
#{fee,jdbcType=DOUBLE}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{enterpriseId,jdbcType=INTEGER}, #{deductionTime,jdbcType=TIMESTAMP})
#{enterpriseId,jdbcType=INTEGER}, #{deductionTime,jdbcType=TIMESTAMP}, #{memberName,jdbcType=VARCHAR},
#{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER},
#{storeGroupName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
insert into tab_billing_voice_code_record
......@@ -84,6 +94,21 @@
<if test="deductionTime != null">
deduction_time,
</if>
<if test="memberName != null">
member_name,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="storeGroupId != null">
store_group_id,
</if>
<if test="storeGroupName != null">
store_group_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="voiceCodeRecordId != null">
......@@ -125,6 +150,21 @@
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="memberName != null">
#{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
#{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
#{storeGroupName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
......@@ -166,6 +206,21 @@
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="memberName != null">
member_name = #{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
store_group_id = #{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
</if>
</set>
where voice_code_record_id = #{voiceCodeRecordId,jdbcType=INTEGER}
</update>
......@@ -182,7 +237,12 @@
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP}
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
member_name = #{memberName,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=INTEGER},
store_group_name = #{storeGroupName,jdbcType=VARCHAR}
where voice_code_record_id = #{voiceCodeRecordId,jdbcType=INTEGER}
</update>
......
......@@ -207,12 +207,12 @@
<select id="listByParentId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
from tab_enterprise_init
from tab_enterprise_init force index(order_by_index)
where enterprise_id = #{enterpriseId}
<if test="parentId != null and parentId != '' ">
and parent_id = #{parentId}
</if>
ORDER BY `level`, parent_id, sort
ORDER BY parent_id, sort, `level`
</select>
......
......@@ -242,7 +242,7 @@
from tab_link
where status = 1
and parent_id &lt;&gt; 0
and type = 0
-- and type = 0
<if test="search != null and search != '' ">
and name like concat('%', #{search}, '%')
</if>
......@@ -266,6 +266,16 @@
from tab_link t1 left join tab_link_scene t2 on t1.link_id = t2.link_id
where (t1.enterprise_type = 1 or (t1.enterprise_type = 2 and t2.enterprise_id = #{enterpriseId} ))
and t1.status = 1
<if test="objectType != null ">
<if test="objectType == 1">
and h5_content is not null
and h5_content &lt;&gt; ''
</if>
<if test="objectType == 2">
and applet_content is not null
and applet_content &lt;&gt; ''
</if>
</if>
order by create_time
</select>
</mapper>
\ No newline at end of file
......@@ -31,8 +31,8 @@ public class LinkController {
}
@RequestMapping("/tree-link-data")
public RestResponse treeLinkData() {
ServiceResponse<List<LinkDTO>> serviceResponse = linkApiService.treeByGic(UserDetailUtils.getUserDetail().getEnterpriseId());
public RestResponse treeLinkData(Integer objectType) {
ServiceResponse<List<LinkDTO>> serviceResponse = linkApiService.treeByGic(UserDetailUtils.getUserDetail().getEnterpriseId(), objectType);
return ResultControllerUtils.commonResult(serviceResponse);
}
......
......@@ -103,6 +103,13 @@ public class WechatMenuController {
return EnterpriseRestResponse.failure(result);
}
@RequestMapping("/synchronize-menu-test")
public RestResponse synchronizeMenu() {
weixinMenuFunService.deleteMenu("wxc6fd9beaf9a9dbe9");
ServiceResponse<String> response = weixinMenuFunService.createMenu("wxc6fd9beaf9a9dbe9", "{\"button\":[{\"appid\":\"\",\"name\":\"会员中心\",\"pagepath\":\"test\",\"type\":\"miniprogram\",\"url\":\"www.baidu.com\"}]}");
return RestResponse.success(response);
}
@RequestMapping("/list-menu-type")
public RestResponse listMenuType() {
List<Map<String, Object>> list = new ArrayList<>();
......
......@@ -107,13 +107,7 @@ public class DoubleCallingRecordController extends DownloadUtils {
recordQO.setCurrentPage(pageNum);
recordQO.setPageSize(1000);
ServiceResponse<Page<DoubleCallingRecordDTO>> result = billingRecordApiService.listDoubleCallingRecord(recordQO);
List<DoubleCallingRecordDTO> list = result.getResult().getResult();
if (fieldCodeList.contains("operatorName")) {
for (DoubleCallingRecordDTO e : list) {
e.setOperatorName(userName);
}
}
return list;
return result.getResult().getResult();
}
};
try {
......@@ -139,7 +133,6 @@ public class DoubleCallingRecordController extends DownloadUtils {
appName("appName", "应用", 0),
remark("remark", "说明", 0),
fee("fee", "费用", 0),
operatorName("operatorName", "操作人", 0)
;
private String fieldCode;
private String fieldName;
......
......@@ -21,6 +21,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
......@@ -31,6 +32,7 @@ import java.util.*;
* @author zhiwj
* @date 2019-12-19 15:13
*/
@RestController
public class InternationalSmsRecordController extends DownloadUtils {
private Logger logger = LogManager.getLogger(VoiceCodeRecordController.class);
......
......@@ -107,13 +107,7 @@ public class RecordingStorageRecordController extends DownloadUtils {
recordQO.setCurrentPage(pageNum);
recordQO.setPageSize(1000);
ServiceResponse<Page<RecordingStorageRecordDTO>> result = billingRecordApiService.listRecordingStorageRecord(recordQO);
List<RecordingStorageRecordDTO> list = result.getResult().getResult();
if (fieldCodeList.contains("operatorName")) {
for (RecordingStorageRecordDTO e : list) {
e.setOperatorName(userName);
}
}
return list;
return result.getResult().getResult();
}
};
try {
......@@ -140,7 +134,6 @@ public class RecordingStorageRecordController extends DownloadUtils {
appName("appName", "应用", 0),
remark("remark", "说明", 0),
fee("fee", "费用", 0),
operatorName("operatorName", "操作人", 0)
;
private String fieldCode;
private String fieldName;
......
......@@ -21,6 +21,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
......@@ -31,6 +32,7 @@ import java.util.*;
* @author zhiwj
* @date 2019-12-19 14:31
*/
@RestController
public class SmsRecordController extends DownloadUtils {
private Logger logger = LogManager.getLogger(SmsRecordController.class);
......
......@@ -126,7 +126,9 @@ public class VoiceCodeRecordController extends DownloadUtils {
receivePhone("receivePhone", "接收号码", 1),
appName("appName", "应用", 0),
fee("fee", "费用", 0),
operatorName("operatorName", "操作人", 0)
memberName("memberName", "会员姓名", 0),
storeName("storeName", "服务门店", 0),
storeGroupName("storeGroupName", "门店分组", 0),
;
private String fieldCode;
private String fieldName;
......
......@@ -40,17 +40,17 @@ public class LinkController {
return ResultControllerUtils.commonResult(serviceResponse);
}
@RequestMapping("/save-link-menu")
public RestResponse saveLinkMenu(Integer parentId, String name, Integer type) {
ServiceResponse<Void> serviceResponse = linkApiService.saveLinkMenu(parentId, name, type);
return ResultControllerUtils.commonResult(serviceResponse);
}
@RequestMapping("/update-link-menu")
public RestResponse updateLinkMenu(Integer linkId, String name, Integer type) {
ServiceResponse<Void> serviceResponse = linkApiService.updateLinkMenu(linkId, name, type);
return ResultControllerUtils.commonResult(serviceResponse);
}
// @RequestMapping("/save-link-menu")
// public RestResponse saveLinkMenu(Integer parentId, String name, Integer type) {
// ServiceResponse<Void> serviceResponse = linkApiService.saveLinkMenu(parentId, name, type);
// return ResultControllerUtils.commonResult(serviceResponse);
// }
//
// @RequestMapping("/update-link-menu")
// public RestResponse updateLinkMenu(Integer linkId, String name, Integer type) {
// ServiceResponse<Void> serviceResponse = linkApiService.updateLinkMenu(linkId, name, type);
// return ResultControllerUtils.commonResult(serviceResponse);
// }
@RequestMapping("/save-link-child-menu")
public RestResponse saveLinkChildMenu(@Validated(LinkQO.LinkSaveValid.class) LinkQO linkQO) {
......
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