|
|
@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -109,6 +110,21 @@ public class ConfigsServiceImpl implements ConfigsService{
|
|
|
currencyDTO.setCr_name(con.getData());
|
|
|
currencyDTO.setCr_standard(1L);
|
|
|
currencyApi.setStandard(currencyDTO);
|
|
|
+ } else if("enableB2B".equals(con.getCode())){
|
|
|
+ int count = configsMapper.selectByCodeAndCompanyId(con.getCode(), BaseContextHolder.getCompanyId());
|
|
|
+ if (count == 0){
|
|
|
+ //不存在,则插入
|
|
|
+ Configs configs = new Configs();
|
|
|
+ configs.setCode(con.getCode());
|
|
|
+ configs.setDescription("启用B2B");
|
|
|
+ configs.setData(con.getData());
|
|
|
+ configs.setCompanyId(BaseContextHolder.getCompanyId());
|
|
|
+ configs.setCreateTime(new Date());
|
|
|
+ configs.setCreatorName(BaseContextHolder.getUserName());
|
|
|
+ configs.setCreatorId(Integer.parseInt(String.valueOf(BaseContextHolder.getUserId())));
|
|
|
+ configsMapper.insertSelective(configs);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
}
|
|
|
configsMapper.updateByCodeSelective(con);
|
|
|
}
|