Commit 7642929b by huangZW

111

parent d6a4c33e
......@@ -24,4 +24,5 @@ public interface AuditApiService {
List<AuditDTO> listByStoreId(String storeId);
AuditDTO findByStoreIdAndChangeField(String storeId,String changeField);
}
......@@ -21,4 +21,6 @@ public interface TabHaobanAuditMapper {
Page<TabHaobanAudit> page(Integer auditType, List<String> storeIds,List<String>staffIds,String wxEnterpriseId, String enterpriseId,Integer auditStatus );
List<TabHaobanAudit> listByStoreId(String storeId);
TabHaobanAudit findByStoreIdAndChangeField(String storeId,String changeField);
}
\ No newline at end of file
......@@ -194,4 +194,13 @@ public class AuditApiServiceImpl implements AuditApiService{
List<AuditDTO> resultList = EntityUtil.changeEntityListByJSON(AuditDTO.class, list);
return resultList;
}
@Override
public AuditDTO findByStoreIdAndChangeField(String storeId,
String changeField) {
TabHaobanAudit tab = auditMapper.findByStoreIdAndChangeField(storeId,changeField);
if(tab == null){
return null;
}
return EntityUtil.changeEntityByJSON(AuditDTO.class, tab);
}
}
......@@ -304,5 +304,14 @@
and commit_store_id = #{storeId,jdbcType=VARCHAR}
and audit_status = 0
</select>
<select id="findByStoreIdAndChangeField" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List" />
from tab_haoban_audit
where 1=1
and commit_store_id = #{storeId,jdbcType=VARCHAR}
and audit_status = 0
and change_field = #{changeField,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
......@@ -252,7 +252,13 @@ public class StoreController extends WebBaseController{
if(auditFlag == 1){
//要审核
logger.info("==================11111");
int i = auditApiService.save(1,wxEnterpriseId, enterpriseId, staffId, storeId, changeField, oldValue, newValue);
AuditDTO auditDTO = auditApiService.findByStoreIdAndChangeField(storeId, changeField);
if(auditDTO == null){
//为空,可继续提交审核
int i = auditApiService.save(1,wxEnterpriseId, enterpriseId, staffId, storeId, changeField, oldValue, newValue);
}else{
return resultResponse(HaoBanErrCode.ERR_400018);
}
}else{
logger.info("==================22222");
auditApiService.editStoreInfo(storeId, changeField, oldValue, newValue);
......
......@@ -89,6 +89,7 @@ public enum HaoBanErrCode {
ERR_400015(400015, "数据为空"),
ERR_400016(400016, "提交人不存在"),
ERR_400017(400017, "成员不存在"),
ERR_400018(400018, "已有待审核的门店字段信息提交,请等待审核完再提交"),
/**
* 文件不存在
......
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