This commit is contained in:
lixiangrong 2016-07-17 18:54:33 +08:00
parent 9d0a00d1e9
commit bab7a0280b
6 changed files with 47 additions and 269 deletions

View File

@ -1,30 +0,0 @@
package com.pxene.dsp.archer.dao;
import com.pxene.dsp.archer.model.GroupTargetAuditModel;
import com.pxene.dsp.archer.model.GroupTargetAuditModelExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface GroupTargetAuditDao {
int countByExample(GroupTargetAuditModelExample example);
int deleteByExample(GroupTargetAuditModelExample example);
int deleteByPrimaryKey(String id);
int insert(GroupTargetAuditModel record);
int insertSelective(GroupTargetAuditModel record);
List<GroupTargetAuditModel> selectByExample(GroupTargetAuditModelExample example);
GroupTargetAuditModel selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") GroupTargetAuditModel record, @Param("example") GroupTargetAuditModelExample example);
int updateByExample(@Param("record") GroupTargetAuditModel record, @Param("example") GroupTargetAuditModelExample example);
int updateByPrimaryKeySelective(GroupTargetAuditModel record);
int updateByPrimaryKey(GroupTargetAuditModel record);
}

View File

@ -1,229 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pxene.dsp.archer.dao.GroupTargetAuditDao" >
<resultMap id="BaseResultMap" type="com.pxene.dsp.archer.model.GroupTargetAuditModel" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="groupid" property="groupid" jdbcType="VARCHAR" />
<result column="result" property="result" jdbcType="VARCHAR" />
<result column="reason" property="reason" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="createtime" property="createtime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
id, groupid, result, reason, remark, createtime
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.pxene.dsp.archer.model.GroupTargetAuditModelExample" >
select
<if test="distinct" >
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from dsp_t_group_target_audit
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from dsp_t_group_target_audit
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from dsp_t_group_target_audit
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.pxene.dsp.archer.model.GroupTargetAuditModelExample" >
delete from dsp_t_group_target_audit
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.pxene.dsp.archer.model.GroupTargetAuditModel" >
insert into dsp_t_group_target_audit (id, groupid, result,
reason, remark, createtime
)
values (#{id,jdbcType=VARCHAR}, #{groupid,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR},
#{reason,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.pxene.dsp.archer.model.GroupTargetAuditModel" >
insert into dsp_t_group_target_audit
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="groupid != null" >
groupid,
</if>
<if test="result != null" >
result,
</if>
<if test="reason != null" >
reason,
</if>
<if test="remark != null" >
remark,
</if>
<if test="createtime != null" >
createtime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="groupid != null" >
#{groupid,jdbcType=VARCHAR},
</if>
<if test="result != null" >
#{result,jdbcType=VARCHAR},
</if>
<if test="reason != null" >
#{reason,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="createtime != null" >
#{createtime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.pxene.dsp.archer.model.GroupTargetAuditModelExample" resultType="java.lang.Integer" >
select count(*) from dsp_t_group_target_audit
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update dsp_t_group_target_audit
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.groupid != null" >
groupid = #{record.groupid,jdbcType=VARCHAR},
</if>
<if test="record.result != null" >
result = #{record.result,jdbcType=VARCHAR},
</if>
<if test="record.reason != null" >
reason = #{record.reason,jdbcType=VARCHAR},
</if>
<if test="record.remark != null" >
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createtime != null" >
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update dsp_t_group_target_audit
set id = #{record.id,jdbcType=VARCHAR},
groupid = #{record.groupid,jdbcType=VARCHAR},
result = #{record.result,jdbcType=VARCHAR},
reason = #{record.reason,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
createtime = #{record.createtime,jdbcType=TIMESTAMP}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.pxene.dsp.archer.model.GroupTargetAuditModel" >
update dsp_t_group_target_audit
<set >
<if test="groupid != null" >
groupid = #{groupid,jdbcType=VARCHAR},
</if>
<if test="result != null" >
result = #{result,jdbcType=VARCHAR},
</if>
<if test="reason != null" >
reason = #{reason,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createtime != null" >
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.pxene.dsp.archer.model.GroupTargetAuditModel" >
update dsp_t_group_target_audit
set groupid = #{groupid,jdbcType=VARCHAR},
result = #{result,jdbcType=VARCHAR},
reason = #{reason,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
createtime = #{createtime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -3,7 +3,6 @@ package osc.git.eh3.test;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
@ -357,13 +356,23 @@ public class TestCode {
//String nowStr = sdf.format(cl.getTime());
//System.out.println(nowStr);
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, 0); // 控制时
calendar.set(Calendar.MINUTE, 0); // 控制分
calendar.set(Calendar.SECOND, 1); // 控制秒
//Calendar calendar = Calendar.getInstance();
//calendar.set(Calendar.HOUR_OF_DAY, 0); // 控制时
//calendar.set(Calendar.MINUTE, 0); // 控制分
//calendar.set(Calendar.SECOND, 1); // 控制秒
//
//Date time = calendar.getTime(); // 得出执行任务的时间,此处为今天的000001
//System.out.println(time);
//List<String> list = new ArrayList<String>();
//list.add("str1");
//list.add("str2");
//int size = list.size();
//String[] arr = list.toArray(new String[size]);//使用了第二种接口返回值和参数均为结果
String str = null;
System.out.println((String)str == null);
Date time = calendar.getTime(); // 得出执行任务的时间,此处为今天的000001
System.out.println(time);
}
public static Long parseDate(String s) {

View File

@ -5,7 +5,6 @@ import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -52,8 +51,30 @@ public class TestReadFile {
}
}
public static void readFile1() {
File file = new File("C:\\Users\\lixiangrong\\Desktop\\白名单\\IMEI\\000000_0");
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(file));
String tempString = null;
while ((tempString = reader.readLine()) != null) {
System.out.println(tempString);
}
reader.close();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException ignored) {
}
}
}
}
public static void main(String[] args) {
readFile();
readFile1();
}
/**

View File

@ -23,7 +23,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.pxene.dsp.archer.dao" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<table tableName="dsp_t_group_target_audit" domainObjectName="GroupTargetAuditModel" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true" />
<table tableName="dsp_t_ad_group_creative" domainObjectName="AdGroupCreativeModel" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true" />
<!--
<table tableName="dsp_t_advertiser" domainObjectName="AdvertiserModel" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true" />
<table tableName="dsp_t_open_request_data" domainObjectName="OpenRequestDataModel" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true"></table>

7
test.md Normal file
View File

@ -0,0 +1,7 @@
**dfd**
~~ffff~~
`dddd`d`d```
| d |
|---|
| df |