PeriodJobMapper.java 4.54 KB
Newer Older
1 2 3 4 5
package pwc.taxtech.atms.vat.dao;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
neo's avatar
neo committed
6
import org.apache.ibatis.annotations.Select;
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.PeriodJob;
import pwc.taxtech.atms.vat.entity.PeriodJobExample;

@Mapper
public interface PeriodJobMapper extends MyVatMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    long countByExample(PeriodJobExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    int deleteByExample(PeriodJobExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    int insert(PeriodJob record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    int insertSelective(PeriodJob record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    List<PeriodJob> selectByExampleWithRowbounds(PeriodJobExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    List<PeriodJob> selectByExample(PeriodJobExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    PeriodJob selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") PeriodJob record, @Param("example") PeriodJobExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") PeriodJob record, @Param("example") PeriodJobExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(PeriodJob record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table TAX_ADMIN.PERIOD_JOB
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(PeriodJob record);
neo's avatar
neo committed
109 110

    @Select("SELECT " +
gary's avatar
gary committed
111 112 113 114 115 116 117 118 119
            " id AS id, " +
            " name AS name, " +
            " current_step AS currentStep, " +
            " project_id AS projectId, " +
            " period AS period, " +
            " steps_code AS stepsCode, " +
            " create_time AS createTime, " +
            " status AS status, " +
            " error_msg AS errorMsg  " +
neo's avatar
neo committed
120
            "FROM " +
gary's avatar
gary committed
121
            " period_job  " +
neo's avatar
neo committed
122
            "WHERE " +
gary's avatar
gary committed
123 124 125
            " status LIKE \"%Begin%\"  " +
            " AND project_id = #{projectId}  " +
            " AND period =#{period}")
neo's avatar
neo committed
126 127 128
    PeriodJob getRunningJob(@Param("projectId") String projectId, @Param("period") Integer period);

    @Select("SELECT " +
gary's avatar
gary committed
129 130 131 132 133 134 135 136 137
            " id AS id, " +
            " name AS name, " +
            " current_step AS currentStep, " +
            " project_id AS projectId, " +
            " period AS period, " +
            " steps_code AS stepsCode, " +
            " create_time AS createTime, " +
            " status AS status, " +
            " error_msg AS errorMsg  " +
neo's avatar
neo committed
138
            "FROM " +
gary's avatar
gary committed
139
            " period_job  " +
neo's avatar
neo committed
140
            "WHERE " +
gary's avatar
gary committed
141 142 143
            " project_id = #{projectId}  " +
            " AND period =#{period} " +
            " AND id = #{id}")
neo's avatar
neo committed
144
    PeriodJob getJobStatus(@Param("projectId") String projectId, @Param("period") Integer period,@Param("id") String id);
145
}