refactor: flatten dto entity and mapper packages
This commit is contained in:
25
src/main/java/com/label/mapper/SourceDataMapper.java
Normal file
25
src/main/java/com/label/mapper/SourceDataMapper.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package com.label.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.label.entity.SourceData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
|
||||
/**
|
||||
* source_data 鐞?Mapper閵? */
|
||||
@Mapper
|
||||
public interface SourceDataMapper extends BaseMapper<SourceData> {
|
||||
|
||||
/**
|
||||
* 閹?ID 閺囧瓨鏌婄挧鍕灐閻樿埖鈧緤绱欑敮?company_id 缁夌喐鍩涢梾鏃傤瀲閿涘鈧? *
|
||||
* @param id 鐠у嫭鏋?ID
|
||||
* @param status 閺傛壆濮搁幀? * @param companyId 瑜版挸澧犵粔鐔稿煕
|
||||
* @return 瑜板崬鎼风悰灞炬殶閿? 鐞涖劎銇氱拋鏉跨秿娑撳秴鐡ㄩ崷銊﹀灗娑撳秴鐫樻禍搴$秼閸撳秶顫ら幋鍑ょ礆
|
||||
*/
|
||||
@Update("UPDATE source_data SET status = #{status}, updated_at = NOW() " +
|
||||
"WHERE id = #{id} AND company_id = #{companyId}")
|
||||
int updateStatus(@Param("id") Long id,
|
||||
@Param("status") String status,
|
||||
@Param("companyId") Long companyId);
|
||||
}
|
||||
Reference in New Issue
Block a user