Browse Source

[fix] 销售管理

修复客户资料其他联系人信息原录入时间和修改时间导致的时间不对问题:去掉客户资料其他联系人信息数据库表的原录入时间和修改时间字段,新增录入人、录入时间、修改人、修改时间字段;实体类去掉原字段、新增这四个字段;插入和修改接口新增这四个字段
dev
liuxiaoxu 3 weeks ago
parent
commit
036fecb9d3
  1. 23
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysContacts.java
  2. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysContactsServiceImpl.java
  3. 19
      ruoyi-admin/src/main/resources/mapper/system/SysContactsMapper.xml
  4. 27
      ruoyi-admin/src/main/resources/templates/system/contacts/contacts.html

23
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysContacts.java

@ -74,9 +74,6 @@ public class SysContacts extends BaseEntity
@Excel(name = "备注")
private String customerRemarks;
private String firstAddTime;
private String updateInfoTime;
public void setContactid(Long contactid)
{
@ -214,21 +211,7 @@ public class SysContacts extends BaseEntity
return customerRemarks;
}
public String getFirstAddTime() {
return firstAddTime;
}
public void setFirstAddTime(String firstAddTime) {
this.firstAddTime = firstAddTime;
}
public String getUpdateInfoTime() {
return updateInfoTime;
}
public void setUpdateInfoTime(String updateInfoTime) {
this.updateInfoTime = updateInfoTime;
}
@Override
public String toString() {
@ -248,8 +231,10 @@ public class SysContacts extends BaseEntity
.append("commonEmail", getCommonEmail())
.append("alternateEmail", getAlternateEmail())
.append("customerRemarks", getCustomerRemarks())
.append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

1
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysContactsServiceImpl.java

@ -64,7 +64,6 @@ public class SysContactsServiceImpl implements ISysContactsService
public int insertSysContacts(SysContacts sysContacts)
{
String loginName = ShiroUtils.getLoginName();
sysContacts.setFirstAddTime(String.valueOf(DateUtils.getNowDate()));
sysContacts.setCreateTime(DateUtils.getNowDate());
sysContacts.setCreateBy(loginName);
int id = sysContactsMapper.insertSysContacts(sysContacts);

19
ruoyi-admin/src/main/resources/mapper/system/SysContactsMapper.xml

@ -20,14 +20,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="commonEmail" column="common_email" />
<result property="alternateEmail" column="alternate_email" />
<result property="customerRemarks" column="customer_remarks" />
<result property="customerRemarks" column="customer_remarks" />
<result property="customerRemarks" column="customer_remarks" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectSysContactsVo">
select contactid, enterprise_code, enterprise_name, customer_name, customer_position, customer_birthday, office_telephone, home_phone, cell_phone, customer_fax, standby_telephone_one, standby_telephone_two, common_email, alternate_email, customer_remarks, first_add_time, update_info_time from sys_contacts
select contactid, enterprise_code, enterprise_name, customer_name, customer_position, customer_birthday, office_telephone, home_phone, cell_phone, customer_fax, standby_telephone_one, standby_telephone_two, common_email, alternate_email, customer_remarks, create_by, create_time, update_by, update_time from sys_contacts
</sql>
<select id="selectSysContactsList" parameterType="SysContacts" resultMap="SysContactsResult">
@ -68,7 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="commonEmail != null">common_email,</if>
<if test="alternateEmail != null">alternate_email,</if>
<if test="customerRemarks != null">customer_remarks,</if>
first_add_time,
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseCode != null">#{enterpriseCode},</if>
@ -85,7 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="commonEmail != null">#{commonEmail},</if>
<if test="alternateEmail != null">#{alternateEmail},</if>
<if test="customerRemarks != null">#{customerRemarks},</if>
NOW(),
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
@ -106,7 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="commonEmail != null">common_email = #{commonEmail},</if>
<if test="alternateEmail != null">alternate_email = #{alternateEmail},</if>
<if test="customerRemarks != null">customer_remarks = #{customerRemarks},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where contactid = #{contactid}
</update>

27
ruoyi-admin/src/main/resources/templates/system/contacts/contacts.html

@ -124,29 +124,10 @@
field: 'customerRemarks',
title: '备注'
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
},
{title: '录入时间',field: 'createTime'},
{title: '更新时间',field: 'updateTime'},
{title: '创建人',field: 'createBy'},
{title: '更新人',field: 'updateBy'},
{
title: '操作',
align: 'center',

Loading…
Cancel
Save