| | |
| | | json = object.get("json").toString(); |
| | | } |
| | | if(type.equals("钢化")){ |
| | | String existingConfig = glassOptimizeMapper.selectConfigByUserAndType(username, type); |
| | | String existingConfig = glassOptimizeMapper.selectConfigByUserAndType(username, 1); |
| | | if (existingConfig == null) { |
| | | String configName = "钢化推荐"; |
| | | glassOptimizeMapper.insertOptimizeConfig(json,1,username,configName); |
| | | }else { |
| | | glassOptimizeMapper.updateOptimizeConfig(json,1,username); |
| | | } |
| | | glassOptimizeMapper.updateOptimizeConfig(json,1,username); |
| | | |
| | | } else if (type.equals("修边")) { |
| | | String existingConfig = glassOptimizeMapper.selectConfigByUserAndType(username, type); |
| | | String existingConfig = glassOptimizeMapper.selectConfigByUserAndType(username, 5); |
| | | if (existingConfig == null) { |
| | | String configName = "修边推荐"; |
| | | String configName = "修边配置"; |
| | | glassOptimizeMapper.insertOptimizeConfig(json,5,username,configName); |
| | | }else { |
| | | glassOptimizeMapper.updateOptimizeConfig(json,5,username); |
| | | } |
| | | glassOptimizeMapper.updateOptimizeConfig(json,5,username); |
| | | }else if (type.equals("磨量")) { |
| | | String existingConfig = glassOptimizeMapper.selectConfigByUserAndType(username, type); |
| | | String existingConfig = glassOptimizeMapper.selectConfigByUserAndType(username, 4); |
| | | if (existingConfig == null) { |
| | | String configName = "磨量推荐"; |
| | | String configName = "磨量配置"; |
| | | glassOptimizeMapper.insertOptimizeConfig(json,4,username,configName); |
| | | }else{ |
| | | glassOptimizeMapper.updateOptimizeConfig(json,4,username); |
| | | } |
| | | glassOptimizeMapper.updateOptimizeConfig(json,4,username); |
| | | |
| | | } |
| | | return true; |
| | | |