New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.goods; |
| | | |
| | | import com.yeshi.fanli.goods.CollectionGoodsV2; |
| | | |
| | | public interface CollectionGoodsV2Mapper { |
| | | |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(CollectionGoodsV2 record); |
| | | |
| | | int insertSelective(CollectionGoodsV2 record); |
| | | |
| | | CollectionGoodsV2 selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(CollectionGoodsV2 record); |
| | | |
| | | int updateByPrimaryKey(CollectionGoodsV2 record); |
| | | } |
| | |
| | | private String smsBind;
|
| | | @Map("sms_extract")
|
| | | private String smsExtract;
|
| | | @Map("sms_extract_success")
|
| | | private String smsExtractSuccess;
|
| | | @Map("sms_extract_fail")
|
| | | private String smsExtractFail;
|
| | | @Map("sms_appid")
|
| | | private String smsAppId;
|
| | | @Map("sms_appkey")
|
| | |
| | | @Map("sms_sign")
|
| | | private String smsSign;
|
| | |
|
| | | public String getSmsExtractSuccess() {
|
| | | return smsExtractSuccess;
|
| | | }
|
| | |
|
| | | public void setSmsExtractSuccess(String smsExtractSuccess) {
|
| | | this.smsExtractSuccess = smsExtractSuccess;
|
| | | }
|
| | |
|
| | | public String getSmsExtractFail() {
|
| | | return smsExtractFail;
|
| | | }
|
| | |
|
| | | public void setSmsExtractFail(String smsExtractFail) {
|
| | | this.smsExtractFail = smsExtractFail;
|
| | | }
|
| | |
|
| | | public String getSmsAppId() {
|
| | | return smsAppId;
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.goods;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
|
| | | @Table("yeshi_ec_collection_goods_v2")
|
| | | public class CollectionGoodsV2 {
|
| | | @Column(name = "cg_id")
|
| | | private Long id;
|
| | | @Column(name = "cg_uid")
|
| | | private UserInfo userInfo;
|
| | | @Column(name = "cg_common_goods_id")
|
| | | private CommonGoods commonGoods;
|
| | | @Column(name = "cg_createtime")
|
| | | private Date createTime;
|
| | | @Column(name = "cg_updatetime")
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public UserInfo getUserInfo() {
|
| | | return userInfo;
|
| | | }
|
| | |
|
| | | public void setUserInfo(UserInfo userInfo) {
|
| | | this.userInfo = userInfo;
|
| | | }
|
| | |
|
| | | public CommonGoods getCommonGoods() {
|
| | | return commonGoods;
|
| | | }
|
| | |
|
| | | public void setCommonGoods(CommonGoods commonGoods) {
|
| | | this.commonGoods = commonGoods;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | }
|
New 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.yeshi.fanli.dao.mybatis.goods.CollectionGoodsV2Mapper"> |
| | | <resultMap id="BaseResultMap" type="com.yeshi.fanli.goods.CollectionGoodsV2"> |
| | | <id column="cg_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="cg_createtime" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="cg_updatetime" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <association property="userInfo" column="cg_uid" |
| | | javaType="com.yeshi.fanli.entity.bus.user.UserInfo"> |
| | | <id column="cg_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | <association property="commonGoods" column="cg_common_goods_id" |
| | | javaType="com.yeshi.fanli.goods.CommonGoods" |
| | | resultMap="com.yeshi.fanli.dao.mybatis.goods.CommonGoodsMapper.BaseResultMap"> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">cg_id,cg_uid,cg_common_goods_id,cg_createtime,cg_updatetime |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_collection_goods_v2 where cg_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_collection_goods_v2 where cg_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.goods.CollectionGoodsV2" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_collection_goods_v2 |
| | | (cg_id,cg_uid,cg_common_goods_id,cg_createtime,cg_updatetime) values |
| | | (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{commonGoods.id,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.goods.CollectionGoodsV2" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_collection_goods_v2 |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">cg_id,</if> |
| | | <if test="userInfo != null">cg_uid,</if> |
| | | <if test="commonGoods != null">cg_common_goods_id,</if> |
| | | <if test="createTime != null">cg_createtime,</if> |
| | | <if test="updateTime != null">cg_updatetime,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="userInfo != null">#{userInfo.id,jdbcType=BIGINT},</if> |
| | | <if test="commonGoods != null">#{commonGoods.id,jdbcType=BIGINT},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.goods.CollectionGoodsV2">update |
| | | yeshi_ec_collection_goods_v2 set cg_uid = |
| | | #{userInfo.id,jdbcType=BIGINT},cg_common_goods_id = |
| | | #{commonGoods.id,jdbcType=BIGINT},cg_createtime = |
| | | #{createTime,jdbcType=TIMESTAMP},cg_updatetime = |
| | | #{updateTime,jdbcType=TIMESTAMP} where cg_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.goods.CollectionGoodsV2"> |
| | | update yeshi_ec_collection_goods_v2 |
| | | <set> |
| | | <if test="userInfo != null">cg_uid=#{userInfo.id,jdbcType=BIGINT},</if> |
| | | <if test="commonGoods != null">cg_common_goods_id=#{commonGoods.id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="createTime != null">cg_createtime=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">cg_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where cg_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | |
|
| | | import java.io.Serializable;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Calendar;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
| | | import com.yeshi.fanli.dao.user.ExtractRecordDao;
|
| | | import com.yeshi.fanli.dao.user.MoneyRecordDao;
|
| | | import com.yeshi.fanli.entity.bus.user.AccountDetails;
|
| | | import com.yeshi.fanli.entity.bus.user.AlipayAccountValidNormalHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.AlipayTransferResultInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.PayInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.exception.AlipayAccountException;
|
| | | import com.yeshi.fanli.exception.AlipayTransferException;
|
| | | import com.yeshi.fanli.exception.NotExistObjectException;
|
| | | import com.yeshi.fanli.exception.ObjectStateException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.MoneyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserNotificationService;
|
| | | import com.yeshi.fanli.util.BeanUtil;
|
| | | import com.yeshi.fanli.util.CMQManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.GsonUtil;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.factory.AccountDetailsFactory;
|
| | |
|
| | |
| | | find, find.getUserInfo());
|
| | | accountDetailsMapper.insertSelective(ad);
|
| | | try {
|
| | | userNotificationService.extractWrong(user.getId(),
|
| | | userNotificationService.extractWrong(user.getId(), find,
|
| | | TimeUtil.getGernalTime(find.getExtractTime(), "yyyy-MM-dd HH:mm"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | |
| | | extractMapper.updateByPrimaryKeySelective(updateExtract);
|
| | |
|
| | | try {
|
| | | userNotificationService.extractSuccess(extract.getUserInfo().getId(),
|
| | | userNotificationService.extractSuccess(extract.getUserInfo().getId(), extract,
|
| | | TimeUtil.getGernalTime(extract.getExtractTime(), "yyyy-MM-dd HH:mm"));
|
| | |
|
| | | LogHelper.userInfo("支付宝转账成功:[提现IP:" + extract.getIp() + ",所转账号:" + extract.getAccount() + ",真实姓名:"
|
| | |
| | | package com.yeshi.fanli.service.impl.user;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
| | | redisManager.saveSMSVCode(phone, SMSHistory.TYPE_EXTRACT, msgCode);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void sendExtractSuccessMsg(String phone, BigDecimal money) throws SMSException {
|
| | | String msg = Constant.smsConfig.getSmsExtractSuccess().replace("[签名]", Constant.smsConfig.getSmsSign())
|
| | | .replace("[金额]", money.toString());
|
| | | // 发送短信
|
| | | TencentSMSUtil.sendSingleMsg(phone, msg);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void sendExtractFailMsg(String phone, BigDecimal money) throws SMSException {
|
| | | String msg = Constant.smsConfig.getSmsExtractFail().replace("[签名]", Constant.smsConfig.getSmsSign())
|
| | | .replace("[金额]", money.toString());
|
| | | // 发送短信
|
| | | TencentSMSUtil.sendSingleMsg(phone, msg);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import com.yeshi.fanli.dao.mybatis.AccountMessageMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.AccountMessage;
|
| | | import com.yeshi.fanli.entity.bus.user.BindingAccount;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.exception.PushException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.push.PushService;
|
| | | import com.yeshi.fanli.service.inter.user.SMSService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserNotificationService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class UserNotificationServiceImpl implements UserNotificationService {
|
| | |
| | |
|
| | | @Resource
|
| | | private PushService pushService;
|
| | |
|
| | | @Resource
|
| | | private SMSService smsService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Override
|
| | | public void newerHongBao(Long uid, BigDecimal money) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void extractWrong(Long uid, String time) {
|
| | | public void extractWrong(Long uid, Extract extract, String time) {
|
| | | // 提现失败短信通知
|
| | | // try {
|
| | | // UserInfo user = userInfoService.getUserById(uid);
|
| | | // if (extract != null && user != null &&
|
| | | // !StringUtil.isNullOrEmpty(user.getPhone())) {
|
| | | // smsService.sendExtractFailMsg(user.getPhone(), extract.getMoney());
|
| | | // }
|
| | | // } catch (Exception e) {
|
| | | // try {
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | // } catch (Exception e1) {
|
| | | // e1.printStackTrace();
|
| | | // }
|
| | | // }
|
| | |
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getExtractWrongTitle(),
|
| | | Constant.znxConfig.getExtractWrongMsg().replace("[时间]", time));
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void extractSuccess(Long uid, String time) {
|
| | | public void extractSuccess(Long uid, Extract extract, String time) {
|
| | | // 提现成功短信通知
|
| | | // try {
|
| | | // UserInfo user = userInfoService.getUserById(uid);
|
| | | // if (extract != null && user != null &&
|
| | | // !StringUtil.isNullOrEmpty(user.getPhone())) {
|
| | | // smsService.sendExtractSuccessMsg(user.getPhone(),
|
| | | // extract.getMoney());
|
| | | // }
|
| | | // } catch (Exception e) {
|
| | | // try {
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | // } catch (Exception e1) {
|
| | | // e1.printStackTrace();
|
| | | // }
|
| | | // }
|
| | |
|
| | | try {
|
| | | pushService.pushZNX(uid, Constant.znxConfig.getExtractSuccessTitle(),
|
| | | Constant.znxConfig.getExtractSuccessMsg().replace("[时间]", time));
|
| | |
| | | package com.yeshi.fanli.service.inter.user;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import com.yeshi.fanli.exception.SMSException;
|
| | |
|
| | | /**
|
| | |
| | | * @throws SMSException
|
| | | */
|
| | | public void sendExtractVCode(String phone) throws SMSException;
|
| | |
|
| | | /**
|
| | | * 提现成功短信
|
| | | * |
| | | * @param phone
|
| | | * @param money
|
| | | */
|
| | | public void sendExtractSuccessMsg(String phone, BigDecimal money) throws SMSException;
|
| | |
|
| | | /**
|
| | | * 发送提现失败验证码
|
| | | * |
| | | * @param phone
|
| | | * @param money
|
| | | */
|
| | | public void sendExtractFailMsg(String phone, BigDecimal money) throws SMSException;
|
| | | }
|
| | |
| | |
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | |
|
| | | /**
|
| | | * 用户通知服务
|
| | | *
|
| | |
| | | * @param uid
|
| | | * @param time
|
| | | */
|
| | | public void extractWrong(Long uid, String time);
|
| | | public void extractWrong(Long uid, Extract extract, String time);
|
| | |
|
| | | /**
|
| | | * 提现成功
|
| | |
| | | * @param uid
|
| | | * @param time
|
| | | */
|
| | | public void extractSuccess(Long uid, String time);
|
| | | public void extractSuccess(Long uid, Extract extract, String time);
|
| | |
|
| | | /**
|
| | | * 支付宝账号验证成功
|
| | |
| | | * @param uid
|
| | | * @param money
|
| | | */
|
| | | public void alipayAccountValidRight(Long uid, BigDecimal money,String account);
|
| | | public void alipayAccountValidRight(Long uid, BigDecimal money, String account);
|
| | |
|
| | | }
|
| | |
| | | #短信验证码模板
|
| | |
|
| | | #登录验证码
|
| | | sms_login=【[签名]】[验证码](返利券验证码),有效期为2分钟。为了保护您的账号安全,验证短信请勿转发他人。
|
| | | sms_login=【[签名]】验证码:[验证码],2分钟内有效。为了保护您的账号安全,验证短信请勿转发他人。
|
| | | #绑定验证码
|
| | | sms_bind=【[签名]】[验证码](返利券验证码),有效期为2分钟。为了保护您的账号安全,验证短信请勿转发他人。
|
| | | #提现验证码
|
| | | sms_extract=【[签名]】[验证码](返利券验证码),有效期为2分钟。为了保护您的账号安全,验证短信请勿转发他人。
|
| | | #提现成功验证码
|
| | | sms_extract_success=【[签名]】恭喜您!成功提现[金额]元,请前往您绑定的提现支付宝账单中确认查收(来自于重庆椰视科技有限公司的转账),如有疑问请联系本APP人工客服。
|
| | | #提现失败验证码
|
| | | sms_extract_fail=【[签名]】本次提现[金额]元未能成功,如有疑问请联系本APP人工客服。
|
| | |
|
| | | sms_appid=1400092621
|
| | | sms_appkey=a710f8995ceb7d1c7dacfaff730531e2
|
| | | sms_sign=椰视网络
|
| | | sms_sign=返利券APP
|