Commit 6c812d91 by Water Wang

optimize

parent a148a4ea
...@@ -64,6 +64,10 @@ public class AclPractitionerPotentialAssigneds implements Serializable { ...@@ -64,6 +64,10 @@ public class AclPractitionerPotentialAssigneds implements Serializable {
* 创建者类型:1为user id(AGMS),2为本人practitioner id(银盾经纪) * 创建者类型:1为user id(AGMS),2为本人practitioner id(银盾经纪)
*/ */
private Integer creatorType; private Integer creatorType;
/**
* 备注
*/
private String remark;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -19,4 +19,8 @@ public interface AclPractitionerPotentialAssignedsMapper { ...@@ -19,4 +19,8 @@ public interface AclPractitionerPotentialAssignedsMapper {
int updateByPrimaryKey(AclPractitionerPotentialAssigneds record); int updateByPrimaryKey(AclPractitionerPotentialAssigneds record);
void insertList(@Param("potentialAssignedsList") List<AclPractitionerPotentialAssigneds> potentialAssignedsList); void insertList(@Param("potentialAssignedsList") List<AclPractitionerPotentialAssigneds> potentialAssignedsList);
List<AclPractitionerPotentialAssigneds> findByPotentialIdAndPractitionerId(@Param("potentialId")Long potentialId, @Param("practitionerId")Long practitionerId);
List<AclPractitionerPotentialAssigneds> findByPractitionerId(@Param("practitionerId")Long practitionerId);
} }
\ No newline at end of file
...@@ -9,4 +9,10 @@ import java.util.List; ...@@ -9,4 +9,10 @@ import java.util.List;
public interface AclPractitionerPotentialAssignedsDALService { public interface AclPractitionerPotentialAssignedsDALService {
void saveAll(List<AclPractitionerPotentialAssigneds> potentialAssignedsList); void saveAll(List<AclPractitionerPotentialAssigneds> potentialAssignedsList);
List<AclPractitionerPotentialAssigneds> findByPotentialIdAndPractitionerId(Long potentialId, Long practitionerId);
void update(AclPractitionerPotentialAssigneds assigneds);
List<AclPractitionerPotentialAssigneds> findByPractitionerId(Long practitionerId);
} }
...@@ -17,4 +17,19 @@ public class AclPractitionerPotentialAssignedsDALServiceImpl implements AclPract ...@@ -17,4 +17,19 @@ public class AclPractitionerPotentialAssignedsDALServiceImpl implements AclPract
public void saveAll(List<AclPractitionerPotentialAssigneds> potentialAssignedsList) { public void saveAll(List<AclPractitionerPotentialAssigneds> potentialAssignedsList) {
aclPractitionerPotentialAssignedsMapper.insertList(potentialAssignedsList); aclPractitionerPotentialAssignedsMapper.insertList(potentialAssignedsList);
} }
@Override
public List<AclPractitionerPotentialAssigneds> findByPotentialIdAndPractitionerId(Long potentialId, Long practitionerId) {
return aclPractitionerPotentialAssignedsMapper.findByPotentialIdAndPractitionerId(potentialId,practitionerId);
}
@Override
public void update(AclPractitionerPotentialAssigneds assigneds) {
aclPractitionerPotentialAssignedsMapper.updateByPrimaryKeySelective(assigneds);
}
@Override
public List<AclPractitionerPotentialAssigneds> findByPractitionerId(Long practitionerId) {
return aclPractitionerPotentialAssignedsMapper.findByPractitionerId(practitionerId);
}
} }
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" /> <result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
<result column="updater_type" jdbcType="INTEGER" property="updaterType" /> <result column="updater_type" jdbcType="INTEGER" property="updaterType" />
<result column="creator_type" jdbcType="INTEGER" property="creatorType" /> <result column="creator_type" jdbcType="INTEGER" property="creatorType" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, assigned_practitioner_id, practitioner_potential_id, time_to_onboarding, is_active, id, assigned_practitioner_id, practitioner_potential_id, time_to_onboarding, is_active,
created_at, created_by, updated_at, updated_by, updater_type, creator_type created_at, created_by, updated_at, updated_by, updater_type, creator_type,remark
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
...@@ -24,6 +25,18 @@ ...@@ -24,6 +25,18 @@
from ag_acl_practitioner_potential_assigneds from ag_acl_practitioner_potential_assigneds
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</select> </select>
<select id="findByPotentialIdAndPractitionerId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_assigneds
where practitioner_potential_id = #{potentialId,jdbcType=BIGINT} and assigned_practitioner_id = #{practitionerId,jdbcType=BIGINT}
</select>
<select id="findByPractitionerId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_practitioner_potential_assigneds
where assigned_practitioner_id = #{practitionerId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_practitioner_potential_assigneds delete from ag_acl_practitioner_potential_assigneds
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
...@@ -32,11 +45,11 @@ ...@@ -32,11 +45,11 @@
insert into ag_acl_practitioner_potential_assigneds (assigned_practitioner_id, practitioner_potential_id, insert into ag_acl_practitioner_potential_assigneds (assigned_practitioner_id, practitioner_potential_id,
time_to_onboarding, is_active, created_at, time_to_onboarding, is_active, created_at,
created_by, updated_at, updated_by, created_by, updated_at, updated_by,
updater_type, creator_type) updater_type, creator_type,remark)
values (#{assignedPractitionerId,jdbcType=BIGINT}, #{practitionerPotentialId,jdbcType=BIGINT}, values (#{assignedPractitionerId,jdbcType=BIGINT}, #{practitionerPotentialId,jdbcType=BIGINT},
#{timeToOnboarding,jdbcType=TIMESTAMP}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{timeToOnboarding,jdbcType=TIMESTAMP}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT},
#{updaterType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER}) #{updaterType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER},#{remark,jdbcType=VARCHER})
</insert> </insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds" useGeneratedKeys="true">
insert into ag_acl_practitioner_potential_assigneds insert into ag_acl_practitioner_potential_assigneds
...@@ -71,6 +84,9 @@ ...@@ -71,6 +84,9 @@
<if test="creatorType != null"> <if test="creatorType != null">
creator_type, creator_type,
</if> </if>
<if test="remark != null">
remark,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="assignedPractitionerId != null"> <if test="assignedPractitionerId != null">
...@@ -103,6 +119,9 @@ ...@@ -103,6 +119,9 @@
<if test="creatorType != null"> <if test="creatorType != null">
#{creatorType,jdbcType=INTEGER}, #{creatorType,jdbcType=INTEGER},
</if> </if>
<if test="remark != null">
#{remark,jdbcType=VARCHER},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds"> <update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPractitionerPotentialAssigneds">
...@@ -138,6 +157,9 @@ ...@@ -138,6 +157,9 @@
<if test="creatorType != null"> <if test="creatorType != null">
creator_type = #{creatorType,jdbcType=INTEGER}, creator_type = #{creatorType,jdbcType=INTEGER},
</if> </if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHER},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
...@@ -152,14 +174,15 @@ ...@@ -152,14 +174,15 @@
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}, updated_by = #{updatedBy,jdbcType=BIGINT},
updater_type = #{updaterType,jdbcType=INTEGER}, updater_type = #{updaterType,jdbcType=INTEGER},
creator_type = #{creatorType,jdbcType=INTEGER} creator_type = #{creatorType,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHER}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<insert id="insertList" parameterType="java.util.List" useGeneratedKeys="true"> <insert id="insertList" parameterType="java.util.List" useGeneratedKeys="true">
insert into ag_acl_practitioner_potential_assigneds (assigned_practitioner_id, practitioner_potential_id, insert into ag_acl_practitioner_potential_assigneds (assigned_practitioner_id, practitioner_potential_id,
time_to_onboarding, is_active, created_at, time_to_onboarding, is_active, created_at,
created_by, updated_at, updated_by, created_by, updated_at, updated_by,
updater_type, creator_type) updater_type, creator_type,remark)
values values
<foreach collection="potentialAssignedsList" item="item" index="index" separator=","> <foreach collection="potentialAssignedsList" item="item" index="index" separator=",">
( (
...@@ -172,7 +195,8 @@ ...@@ -172,7 +195,8 @@
#{item.updatedAt}, #{item.updatedAt},
#{item.updatedBy}, #{item.updatedBy},
#{item.updaterType}, #{item.updaterType},
#{item.creatorType} #{item.creatorType},
#{item.remark}
) )
</foreach> </foreach>
</insert> </insert>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment