|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <update id="updateInvalidProjUse"  > | 
|---|
|  |  |  | update   sys_proj_use set STATUS='无效' | 
|---|
|  |  |  | where date_format(now(), '%Y-%m-%d') > date_format(FAIL_TIME, '%Y-%m-%d') and STATUS='有效' | 
|---|
|  |  |  | where  date_format(now(), '%Y-%m-%d') > date_format(FAIL_TIME, '%Y-%m-%d') | 
|---|
|  |  |  | and STATUS='有效' | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <resultMap type="SysProjUse" id="TaoCanWithProjMap"> | 
|---|
|  |  |  | 
|---|
|  |  |  | left join shopping_goods f on e.proj_id=f.id | 
|---|
|  |  |  | where 1=1 and a.type='套餐' and a.TAOCAN_ID IS NULL | 
|---|
|  |  |  | <if test="record.queryKey != null and record.queryKey !='' "> | 
|---|
|  |  |  | and (instr(b.name, #{record.queryKey}) or instr(b.zjm, #{record.queryKey}) or instr(goods_no, #{record.queryKey})) | 
|---|
|  |  |  | and (instr(b.name, #{record.queryKey}) or instr(b.zjm, #{record.queryKey}) or instr(b.goods_no, #{record.queryKey})) | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.isOver != null and record.isOver !='' "> | 
|---|
|  |  |  | and a.IS_OVER = #{record.isOver} | 
|---|