| | |
| | | select ${fields} from ${tableName} where ${where} |
| | | </select> |
| | | |
| | | <select id="tempDeal" statementType="STATEMENT" resultType="java.lang.Long"> |
| | | <select id="tempDeal" statementType="STATEMENT" resultType="java.lang.Integer"> |
| | | |
| | | UPDATE ${tableTempName} t |
| | | SET deal = 1 |
| | |
| | | <select id="insertMatintainDetailFromTemp" statementType="STATEMENT" resultType="java.lang.Integer"> |
| | | |
| | | INSERT INTO maintain_detail |
| | | SELECT md5(uuid()) as id, ${maintainId} as parent_id, 'create' as operate, id as pre_merge_id, NOW() as createdate |
| | | SELECT md5(uuid()) as id, ${maintainId} as parent_id, ${operate} as operate, id as pre_merge_id, NOW() as create_time |
| | | from ${tableTempName} m WHERE m.deal = 0 |
| | | |
| | | </select> |
| | | |
| | | <select id="insertMatintainDetailFromStandrad" statementType="STATEMENT" resultType="java.lang.Integer"> |
| | | |
| | | INSERT INTO maintain_detail |
| | | SELECT md5(uuid()) as id, ${maintainId} as parent_id, 'delete' as operate, id as pre_merge_id, NOW() as create_time |
| | | from ${tableTempName} m WHERE m.deal = 0 |
| | | |
| | | </select> |
| | |
| | | |
| | | update ${tableTempName} |
| | | set std_id = md5(uuid()) WHERE deal = 0 |
| | | |
| | | </select> |
| | | |
| | | <select id="insertRecordFromStandrad" statementType="STATEMENT" resultType="java.lang.Integer"> |
| | | INSERT INTO ${recordTableName} |
| | | SELECT ${tempFieldList}, 0 as deal |
| | | from ${tableName} |
| | | |
| | | </select> |
| | | |
| | |
| | | DELETE ${tableTempName} from ${tableTempName} |
| | | INNER JOIN maintain_detail on maintain_detail.pre_merge_id = ${tableTempName}.id |
| | | WHERE maintain_detail.parent_id = ${maintainId} and ${tableTempName}.std_id = ${stdId} |
| | | \ |
| | | |
| | | |
| | | </select> |
| | | </mapper> |