Commit d1ce99b7 by lihui.wang

规范命名

parent 17a4c9da
package com.freemud.pay.job.dao.mapper;
import com.freemud.pay.job.dao.IBaseDao;
import com.freemud.pay.job.dao.dbModel.PartnerDM;
public interface PartnerMapper extends IBaseDao<PartnerDM>{
int deleteByPrimaryKey(Integer id);
@Override
int insert(PartnerDM record);
@Override
int insertSelective(PartnerDM record);
PartnerDM selectByPrimaryKey(Integer id);
@Override
int updateByPrimaryKeySelective(PartnerDM record);
@Override
int updateByPrimaryKey(PartnerDM record);
}
\ No newline at end of file
package com.freemud.pay.job.dao.mapper;
import com.freemud.pay.job.dao.IBaseDao;
import com.freemud.pay.job.dao.dbModel.PayDM;
public interface PayMapper extends IBaseDao<PayDM>{
int deleteByPrimaryKey(Long id);
int insert(PayDM record);
int insertSelective(PayDM record);
PayDM selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(PayDM record);
@Override
int updateByPrimaryKey(PayDM record);
}
\ No newline at end of file
package com.freemud.pay.job.dao.mapper;
import com.freemud.pay.job.dao.IBaseDao;
import com.freemud.pay.job.dao.dbModel.PayMessageActiveDM;
public interface PayMessageActiveMapper extends IBaseDao<PayMessageActiveDM> {
int deleteByPrimaryKey(Long id);
int insert(PayMessageActiveDM record);
@Override
int insertSelective(PayMessageActiveDM record);
PayMessageActiveDM selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(PayMessageActiveDM record);
@Override
int updateByPrimaryKey(PayMessageActiveDM record);
}
\ No newline at end of file
package com.freemud.pay.job.dao.mapper;
import com.freemud.pay.job.dao.IBaseDao;
import com.freemud.pay.job.dao.dbModel.PayMessageDM;
import java.util.List;
public interface PayMessageMapper extends IBaseDao<PayMessageDM>{
int deleteByPrimaryKey(Long id);
@Override
int insert(PayMessageDM record);
@Override
int insertSelective(PayMessageDM record);
PayMessageDM selectByPrimaryKey(Long id);
@Override
int updateByPrimaryKeySelective(PayMessageDM record);
@Override
int updateByPrimaryKey(PayMessageDM record);
List<PayMessageDM> getPayMessages(String dbPartition, String linkServer);
}
\ No newline at end of file
package com.freemud.pay.job.dao.repository;
import com.freemud.pay.job.dao.dbModel.PayMessageActiveDM;
import com.freemud.pay.job.dao.dbModel.PayMessageDM;
import com.freemud.pay.job.entity.PayMessage;
import java.util.List;
......
......@@ -2,11 +2,9 @@ package com.freemud.pay.job.dao.repository.Impl;
import com.freemud.pay.job.dao.IBaseDao;
import com.freemud.pay.job.dao.dbModel.PayMessageActiveDM;
import com.freemud.pay.job.dao.mapper.PayMessageActiveMapper;
import com.freemud.pay.job.dao.mapper.PayMessageActiveDMMapper;
import com.freemud.pay.job.dao.repository.IPayMessageActiveRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;
/**
* All rights Reserved, Designed By www.freemud.cn
......@@ -24,7 +22,7 @@ import org.springframework.stereotype.Repository;
public class PayMessageActiveRepositoryImpl extends BaseRepositoryImpl implements IPayMessageActiveRepository {
@Autowired
PayMessageActiveMapper payMessageActiveMapper;
PayMessageActiveDMMapper payMessageActiveMapper;
@Override
protected IBaseDao getDao() {
......
......@@ -2,11 +2,9 @@ package com.freemud.pay.job.dao.repository.Impl;
import com.freemud.pay.job.dao.IBaseDao;
import com.freemud.pay.job.dao.dbModel.PayMessageDM;
import com.freemud.pay.job.dao.mapper.PayMessageMapper;
import com.freemud.pay.job.dao.mapper.PayMessageDMMapper;
import com.freemud.pay.job.dao.repository.IPayMessageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;
import java.util.List;
......@@ -26,7 +24,7 @@ import java.util.List;
public class PayMessageRepositoryImpl extends BaseRepositoryImpl implements IPayMessageRepository {
@Autowired
PayMessageMapper payMessageMapper;
PayMessageDMMapper payMessageMapper;
@Override
protected IBaseDao getDao() {
......
package com.freemud.pay.job.service;
import com.freemud.pay.job.dao.dbModel.PartnerDM;
import org.springframework.stereotype.Service;
import java.util.List;
......
......@@ -2,7 +2,6 @@ package com.freemud.pay.job.service;
import com.freemud.pay.job.dao.dbModel.PayMessageActiveDM;
import com.freemud.pay.job.dao.dbModel.PayMessageDM;
import com.freemud.pay.job.entity.PayMessage;
import com.freemud.pay.job.service.impl.AliFuWuChuangSingleMessageSender;
import org.apache.commons.lang.StringUtils;
......
......@@ -23,7 +23,7 @@
<!--JDBC URL: jdbc:mysql://<host>:<port>/<database_name>-->
<jdbcConnection
driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"
connectionURL="jdbc:sqlserver://115.159.142.32:9528;databasename=Freemud_ThirdParty"
connectionURL="jdbc:sqlserver://115.159.142.32:9528;databasename=zhuihu"
userId="zhuihutest"
password="zhuihutest@freemud">
</jdbcConnection>
......@@ -55,25 +55,25 @@
</javaModelGenerator>
<!--Mapper映射文件生成所在的目录 为每一个数据库的表生成对应的SqlMap文件 -->
<!--<sqlMapGenerator targetPackage="mapper"-->
<!--targetProject="src/main/resources">-->
<!--<property name="enableSubPackages" value="false"/>-->
<!--</sqlMapGenerator>-->
<sqlMapGenerator targetPackage="mapper"
targetProject="src/main/resources">
<property name="enableSubPackages" value="false"/>
</sqlMapGenerator>
<!-- 客户端代码,生成易于使用的针对Model对象和XML配置文件 的代码
type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象
type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象
type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口
-->
<!--<javaClientGenerator targetPackage="com.freemud.pay.job.dao.mapper"-->
<!--targetProject="src/main/java" type="XMLMAPPER">-->
<!--<property name="enableSubPackages" value="true"/>-->
<!--</javaClientGenerator>-->
<!--<table tableName="pay" domainObjectName="PayDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<table tableName="Pay_Message" domainObjectName="PayMessageDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>
<table tableName="Pay_Message_Active" domainObjectName="PayMessageActiveDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>
<!--<table tableName="Partner" domainObjectName="PartnerDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<javaClientGenerator targetPackage="com.freemud.pay.job.dao.mapper"
targetProject="src/main/java" type="XMLMAPPER">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<table tableName="pay" domainObjectName="PayDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>
<!--<table tableName="Pay_Message" domainObjectName="PayMessageDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<!--<table tableName="Pay_Message_Active" domainObjectName="PayMessageActiveDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<table tableName="Partner" domainObjectName="PartnerDM" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>
<!--<table tableName="partner" domainObjectName="Partner" ></table>
......
<?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.freemud.pay.job.dao.mapper.PartnerMapper">
<resultMap id="BaseResultMap" type="com.freemud.pay.job.dao.dbModel.PartnerDM">
<id column="ID" jdbcType="INTEGER" property="id" />
<result column="PartnerName" jdbcType="VARCHAR" property="partnername" />
<result column="OurAccount_Partner" jdbcType="VARCHAR" property="ouraccountPartner" />
<result column="Logo" jdbcType="VARCHAR" property="logo" />
<result column="Description" jdbcType="VARCHAR" property="description" />
<result column="PartnerCode" jdbcType="VARCHAR" property="partnercode" />
<result column="AppSecret" jdbcType="VARCHAR" property="appsecret" />
<result column="EBCode" jdbcType="VARCHAR" property="ebcode" />
<result column="EnableSMS" jdbcType="BIT" property="enablesms" />
<result column="PartnerType" jdbcType="VARCHAR" property="partnertype" />
<result column="UnifyId" jdbcType="VARCHAR" property="unifyid" />
</resultMap>
<sql id="Base_Column_List">
ID, PartnerName, OurAccount_Partner, Logo, Description, PartnerCode, AppSecret, EBCode,
EnableSMS, PartnerType, UnifyId
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from Partner
where ID = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from Partner
where ID = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.freemud.pay.job.dao.dbModel.Partner">
insert into Partner (ID, PartnerName, OurAccount_Partner,
Logo, Description, PartnerCode,
AppSecret, EBCode, EnableSMS,
PartnerType, UnifyId)
values (#{id,jdbcType=INTEGER}, #{partnername,jdbcType=VARCHAR}, #{ouraccountPartner,jdbcType=VARCHAR},
#{logo,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{partnercode,jdbcType=VARCHAR},
#{appsecret,jdbcType=VARCHAR}, #{ebcode,jdbcType=VARCHAR}, #{enablesms,jdbcType=BIT},
#{partnertype,jdbcType=VARCHAR}, #{unifyid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.freemud.pay.job.dao.dbModel.PartnerDM">
insert into Partner
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="partnername != null">
PartnerName,
</if>
<if test="ouraccountPartner != null">
OurAccount_Partner,
</if>
<if test="logo != null">
Logo,
</if>
<if test="description != null">
Description,
</if>
<if test="partnercode != null">
PartnerCode,
</if>
<if test="appsecret != null">
AppSecret,
</if>
<if test="ebcode != null">
EBCode,
</if>
<if test="enablesms != null">
EnableSMS,
</if>
<if test="partnertype != null">
PartnerType,
</if>
<if test="unifyid != null">
UnifyId,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="partnername != null">
#{partnername,jdbcType=VARCHAR},
</if>
<if test="ouraccountPartner != null">
#{ouraccountPartner,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="partnercode != null">
#{partnercode,jdbcType=VARCHAR},
</if>
<if test="appsecret != null">
#{appsecret,jdbcType=VARCHAR},
</if>
<if test="ebcode != null">
#{ebcode,jdbcType=VARCHAR},
</if>
<if test="enablesms != null">
#{enablesms,jdbcType=BIT},
</if>
<if test="partnertype != null">
#{partnertype,jdbcType=VARCHAR},
</if>
<if test="unifyid != null">
#{unifyid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.freemud.pay.job.dao.dbModel.PartnerDM">
update Partner
<set>
<if test="partnername != null">
PartnerName = #{partnername,jdbcType=VARCHAR},
</if>
<if test="ouraccountPartner != null">
OurAccount_Partner = #{ouraccountPartner,jdbcType=VARCHAR},
</if>
<if test="logo != null">
Logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="description != null">
Description = #{description,jdbcType=VARCHAR},
</if>
<if test="partnercode != null">
PartnerCode = #{partnercode,jdbcType=VARCHAR},
</if>
<if test="appsecret != null">
AppSecret = #{appsecret,jdbcType=VARCHAR},
</if>
<if test="ebcode != null">
EBCode = #{ebcode,jdbcType=VARCHAR},
</if>
<if test="enablesms != null">
EnableSMS = #{enablesms,jdbcType=BIT},
</if>
<if test="partnertype != null">
PartnerType = #{partnertype,jdbcType=VARCHAR},
</if>
<if test="unifyid != null">
UnifyId = #{unifyid,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.freemud.pay.job.dao.dbModel.PartnerDM">
update Partner
set PartnerName = #{partnername,jdbcType=VARCHAR},
OurAccount_Partner = #{ouraccountPartner,jdbcType=VARCHAR},
Logo = #{logo,jdbcType=VARCHAR},
Description = #{description,jdbcType=VARCHAR},
PartnerCode = #{partnercode,jdbcType=VARCHAR},
AppSecret = #{appsecret,jdbcType=VARCHAR},
EBCode = #{ebcode,jdbcType=VARCHAR},
EnableSMS = #{enablesms,jdbcType=BIT},
PartnerType = #{partnertype,jdbcType=VARCHAR},
UnifyId = #{unifyid,jdbcType=VARCHAR}
where ID = #{id,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.freemud.pay.job.dao.mapper.PayMessageMapper">
<resultMap id="BaseResultMap" type="com.freemud.pay.job.dao.dbModel.PayMessageDM">
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="PartnerId" jdbcType="INTEGER" property="partnerid" />
<result column="FMId" jdbcType="VARCHAR" property="fmid" />
<result column="TemplateId" jdbcType="VARCHAR" property="templateid" />
<result column="UserId" jdbcType="VARCHAR" property="userid" />
<result column="Status" jdbcType="INTEGER" property="status" />
<result column="TryTimes" jdbcType="INTEGER" property="trytimes" />
<result column="CreateDate" jdbcType="TIMESTAMP" property="createdate" />
<result column="LastEditDate" jdbcType="TIMESTAMP" property="lasteditdate" />
<result column="Code" jdbcType="CHAR" property="code" />
<result column="Pay_Message_Active_ID" jdbcType="BIGINT" property="payMessageActiveId" />
</resultMap>
<sql id="Base_Column_List">
Id, PartnerId, FMId, TemplateId, UserId, Status, TryTimes, CreateDate, LastEditDate,
Code, Pay_Message_Active_ID
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from Pay_Message
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from Pay_Message
where Id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.freemud.pay.job.dao.dbModel.PayMessageDM">
insert into Pay_Message (Id, PartnerId, FMId,
TemplateId, UserId, Status,
TryTimes, CreateDate, LastEditDate,
Code, Pay_Message_Active_ID)
values (#{id,jdbcType=BIGINT}, #{partnerid,jdbcType=INTEGER}, #{fmid,jdbcType=VARCHAR},
#{templateid,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{trytimes,jdbcType=INTEGER}, #{createdate,jdbcType=TIMESTAMP}, #{lasteditdate,jdbcType=TIMESTAMP},
#{code,jdbcType=CHAR}, #{payMessageActiveId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.freemud.pay.job.dao.dbModel.PayMessageDM">
insert into Pay_Message
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="partnerid != null">
PartnerId,
</if>
<if test="fmid != null">
FMId,
</if>
<if test="templateid != null">
TemplateId,
</if>
<if test="userid != null">
UserId,
</if>
<if test="status != null">
Status,
</if>
<if test="trytimes != null">
TryTimes,
</if>
<if test="createdate != null">
CreateDate,
</if>
<if test="lasteditdate != null">
LastEditDate,
</if>
<if test="code != null">
Code,
</if>
<if test="payMessageActiveId != null">
Pay_Message_Active_ID,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="partnerid != null">
#{partnerid,jdbcType=INTEGER},
</if>
<if test="fmid != null">
#{fmid,jdbcType=VARCHAR},
</if>
<if test="templateid != null">
#{templateid,jdbcType=VARCHAR},
</if>
<if test="userid != null">
#{userid,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="trytimes != null">
#{trytimes,jdbcType=INTEGER},
</if>
<if test="createdate != null">
#{createdate,jdbcType=TIMESTAMP},
</if>
<if test="lasteditdate != null">
#{lasteditdate,jdbcType=TIMESTAMP},
</if>
<if test="code != null">
#{code,jdbcType=CHAR},
</if>
<if test="payMessageActiveId != null">
#{payMessageActiveId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.freemud.pay.job.dao.dbModel.PayMessageDM">
update Pay_Message
<set>
<if test="partnerid != null">
PartnerId = #{partnerid,jdbcType=INTEGER},
</if>
<if test="fmid != null">
FMId = #{fmid,jdbcType=VARCHAR},
</if>
<if test="templateid != null">
TemplateId = #{templateid,jdbcType=VARCHAR},
</if>
<if test="userid != null">
UserId = #{userid,jdbcType=VARCHAR},
</if>
<if test="status != null">
Status = #{status,jdbcType=INTEGER},
</if>
<if test="trytimes != null">
TryTimes = #{trytimes,jdbcType=INTEGER},
</if>
<if test="createdate != null">
CreateDate = #{createdate,jdbcType=TIMESTAMP},
</if>
<if test="lasteditdate != null">
LastEditDate = #{lasteditdate,jdbcType=TIMESTAMP},
</if>
<if test="code != null">
Code = #{code,jdbcType=CHAR},
</if>
<if test="payMessageActiveId != null">
Pay_Message_Active_ID = #{payMessageActiveId,jdbcType=BIGINT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.freemud.pay.job.dao.dbModel.PayMessageDM">
update Pay_Message
set PartnerId = #{partnerid,jdbcType=INTEGER},
FMId = #{fmid,jdbcType=VARCHAR},
TemplateId = #{templateid,jdbcType=VARCHAR},
UserId = #{userid,jdbcType=VARCHAR},
Status = #{status,jdbcType=INTEGER},
TryTimes = #{trytimes,jdbcType=INTEGER},
CreateDate = #{createdate,jdbcType=TIMESTAMP},
LastEditDate = #{lasteditdate,jdbcType=TIMESTAMP},
Code = #{code,jdbcType=CHAR},
Pay_Message_Active_ID = #{payMessageActiveId,jdbcType=BIGINT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
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