Commit 231aa93d by fudahua

Merge remote-tracking branch 'origin/developer' into developer

parents 403a1ba8 15a10532
......@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.TemplateEnterpriseRelatedDTO;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanTemplateEnterpriseRelationMapper;
import com.gic.haoban.manage.service.entity.TabHaobanTemplateEnterpriseRelation;
......@@ -30,6 +31,7 @@ public class TemplateEnterpriseRelatedServiceImpl implements TemplateEnterpriseR
@Override
public void insert(TemplateEnterpriseRelatedDTO dto) {
dto.setTemplateEnterpriseRelationId(StringUtil.randomUUID());
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setStatusFlag(1);
......
......@@ -5,10 +5,13 @@ import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import com.alibaba.dubbo.common.json.JSON;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.api.dto.EnterpriseDTO;
import com.gic.enterprise.api.service.EnterpriseService;
......@@ -30,6 +33,8 @@ import cn.hutool.core.collection.CollectionUtil;
@Service
public class ApplicationTemplateApiServiceImpl implements ApplicationTemplateApiService {
private static Logger logger = LoggerFactory.getLogger(ApplicationTemplateApiServiceImpl.class);
@Autowired
private ApplicationTemplateService applicationTemplateService;
......@@ -112,7 +117,12 @@ public class ApplicationTemplateApiServiceImpl implements ApplicationTemplateApi
for (String wxEnterpriseId : wxEnterpriseIdArr) {
TemplateEnterpriseRelatedDTO dto = templateEnterpriseRelatedService.selectByWxEnterpriseId(wxEnterpriseId);
if(dto != null){
continue;
if(dto.getApplicationTemplateId().equals(applicationTemplateId)){
continue;
}else{
dto.setApplicationTemplateId(applicationTemplateId);
templateEnterpriseRelatedService.update(dto);
}
}
dto = new TemplateEnterpriseRelatedDTO();
dto.setWxEnterpriseId(wxEnterpriseId);
......
......@@ -109,7 +109,7 @@
select
<include refid="Base_Column_List" />
from tab_haoban_template_application_related
where application_template_id = #{applicationTemplateId,jdbcType=VARCHAR}
where template_id = #{applicationTemplateId,jdbcType=VARCHAR}
and status_flag = 1
</select>
......@@ -117,7 +117,7 @@
select
<include refid="Base_Column_List" />
from tab_haoban_template_application_related
where application_template_id = #{applicationTemplateId,jdbcType=VARCHAR}
where template_id = #{applicationTemplateId,jdbcType=VARCHAR}
and application_id = #{applicationId}
and status_flag = 1
</select>
......
......@@ -11,7 +11,7 @@
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
template_enterprise_relation_id, wx_enterprise_id, application_template_id, status_flag,wx_enterprise_name
template_enterprise_relation_id, wx_enterprise_id, application_template_id, status_flag,wx_enterprise_name,
create_time, update_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
......
......@@ -202,6 +202,8 @@ public class AuditController extends WebBaseController{
Integer sex = json.getInteger("sex")==null?0:json.getInteger("sex");
String phoneNumber = json.getString("phoneNumber")==null?"":json.get("phoneNumber").toString();
String nationCode = json.getString("nationCode")==null?"":json.get("nationCode").toString();
String auditStaffId = json.getString("staffId")==null?"":json.get("staffId").toString();
String storeId = audit.getCommitStoreId();
if(auditStatus == 1){
//审核同意
......@@ -222,7 +224,7 @@ public class AuditController extends WebBaseController{
staffClerkRelation.setStoreId(storeId);
staffClerkRelation.setWxEnterpriseId(wxEnterpriseId);
staffClerkRelation.setWxUserId(wxUserId);
staffClerkRelation.setStaffId(staffId);
staffClerkRelation.setStaffId(auditStaffId);
staffClerkRelationApiService.insertOrUpdate(staffClerkRelation);
audit.setAuditStatus(1);
//发送消息
......
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